:root {
  --bg: #0b0d17;
  --bg2: #111422;
  --card-solid: #161922;
  --border: rgba(255, 255, 255, 0.06);
  --purple: #8b5cf6;
  --purple-bright: #a78bfa;
  --purple-dim: rgba(139, 92, 246, 0.15);
  --text: #f1f5f9;
  --text2: #94a3b8;
  --muted: #64748b;
  --green: #34d399;
  --red: #f87171;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

button, input, textarea, select { font: inherit; color: inherit; }

.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  width: 100%;
  background: var(--bg);
}

.hidden { display: none !important; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(300px, 88vw);
  background: var(--bg2);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: calc(16px + var(--safe-top)) 12px calc(16px + var(--safe-bottom));
  transition: transform 0.25s ease;
}

.app-drawer { left: 0; transform: translateX(-105%); border-right: 1px solid var(--border); }
.app-drawer.open { transform: translateX(0); }

.conv-drawer { left: 0; width: min(320px, 92vw); transform: translateX(-105%); }
.conv-drawer.open { transform: translateX(0); }

.drawer-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 16px; }
.drawer-head strong { display: block; font-size: 16px; font-weight: 600; }
.drawer-head span { font-size: 12px; color: var(--muted); }
.drawer-logo { border-radius: 8px; }

.drawer-divider { height: 1px; background: var(--border); margin: 8px 0; flex-shrink: 0; }
.drawer-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  margin: 2px 0;
  border: none;
  background: transparent;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  color: var(--text2);
  font-size: 16px;
}
.drawer-link svg { flex-shrink: 0; opacity: 0.75; }
.drawer-link.active { background: var(--purple-dim); color: var(--text); }
.drawer-link.active svg { color: var(--purple-bright); opacity: 1; }

.drawer-profile {
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(11, 13, 23, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
}
.drawer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple-dim);
  color: var(--purple-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.drawer-profile-name { font-size: 16px; font-weight: 600; }
.drawer-profile-role { font-size: 12px; color: var(--purple-bright); }

.drawer-vps-card {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(11, 13, 23, 0.45);
}
.drawer-vps-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.drawer-vps-row span:first-child { font-size: 12px; color: var(--text2); }
.drawer-vps-row strong { color: var(--purple-bright); font-size: 16px; }
.drawer-vps-note { font-size: 11px; color: var(--muted); }

.topbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: calc(8px + var(--safe-top)) 8px 8px 4px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 56px;
  flex-shrink: 0;
}
.topbar-title { flex: 1; min-width: 0; padding-left: 4px; }
.topbar-title h1 { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-sub { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--muted); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.status-dot.offline { background: var(--red); }
.status-dot.thinking { background: var(--purple-bright); }
.topbar-actions { display: flex; align-items: center; }
.topbar-actions .icon-btn { color: var(--purple-bright); }

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--purple-bright);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn.plain { color: var(--text); }

.nucleo-bell-btn { position: relative; }
.ih-bell-dot {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 0 2px var(--bg);
  pointer-events: none;
}
.ih-bell-dot.visible { display: block; }

/* Campana Núcleo — estilos siempre cargados (no dependen de inversion.css) */
.nucleo-notif-host {
  position: fixed;
  inset: 0;
  z-index: 12000;
  pointer-events: none;
}
.nucleo-notif-host.open { pointer-events: auto; }
.nucleo-notif-host .rt-notif-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12001;
  background: rgba(0, 0, 0, 0.45);
}
.nucleo-notif-host .rt-notif-panel {
  position: fixed;
  top: 56px;
  right: 12px;
  left: auto;
  width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  z-index: 12002;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(24, 28, 40, 0.98) 0%, rgba(10, 14, 20, 0.98) 100%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  color: #e8eef8;
}
.nucleo-notif-host .rt-notif-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.nucleo-notif-host .rt-notif-head h3 {
  margin: 0;
  font-size: 0.95rem;
  flex: 1;
}
.nucleo-notif-host .rt-notif-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.nucleo-notif-host .rt-link {
  border: none;
  background: transparent;
  color: #7dd3fc;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
}
.nucleo-notif-host .rt-link-danger { color: #f87171; }
.nucleo-notif-host .rt-notif-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.nucleo-notif-host .rt-notif-list {
  overflow: auto;
  padding: 10px 12px 14px;
  flex: 1;
  min-height: 0;
}
.nucleo-notif-host .rt-notif-empty {
  margin: 0;
  padding: 18px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}
.nucleo-notif-host .rt-notif-error { color: #f87171; }
.nucleo-notif-host .rt-notif-item-row {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.nucleo-notif-host .rt-notif-item {
  display: block;
  flex: 1;
  width: auto;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  padding: 10px 12px;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
}
.nucleo-notif-host .rt-notif-item.unread {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(96, 165, 250, 0.08);
}
.nucleo-notif-host .rt-notif-item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 4px;
}
.nucleo-notif-host .rt-notif-item-top strong { font-size: 0.84rem; }
.nucleo-notif-host .rt-notif-item-top em {
  font-style: normal;
  font-size: 0.72rem;
  color: #94a3b8;
}
.nucleo-notif-host .rt-notif-item-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.nucleo-notif-host .rt-notif-plat {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}
.nucleo-notif-host .rt-notif-plat-pwa { color: #7dd3fc; border-color: rgba(125, 211, 252, 0.45); }
.nucleo-notif-host .rt-notif-plat-desktop { color: #c4b5fd; border-color: rgba(196, 181, 253, 0.45); }
.nucleo-notif-host .rt-notif-plat-android { color: #86efac; border-color: rgba(134, 239, 172, 0.45); }
.nucleo-notif-host .rt-notif-tag {
  display: inline-block;
  font-size: 0.68rem;
  color: #94a3b8;
  margin-bottom: 4px;
}
.nucleo-notif-host .rt-notif-item p {
  margin: 0;
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}
.nucleo-notif-host .rt-notif-del {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.nucleo-notif-host .rt-notif-del:hover { color: #f87171; border-color: rgba(248, 113, 113, 0.45); }

.nucleo-notif-host .rt-notif-sev {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  line-height: 1.3;
  white-space: nowrap;
}
.nucleo-notif-host .rt-notif-sev-critical { color: #fca5a5; background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.45); }
.nucleo-notif-host .rt-notif-sev-high { color: #fdba74; background: rgba(249, 115, 22, 0.12); border: 1px solid rgba(249, 115, 22, 0.35); }
.nucleo-notif-host .rt-notif-sev-medium { color: #fde68a; background: rgba(234, 179, 8, 0.12); border: 1px solid rgba(234, 179, 8, 0.3); }
.nucleo-notif-host .rt-notif-sev-low { color: #94a3b8; background: rgba(148, 163, 184, 0.1); border: 1px solid rgba(148, 163, 184, 0.25); }

@media (max-width: 640px) {
  .nucleo-notif-host .rt-notif-panel {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: min(88vh, 720px);
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    animation: nucleo-sheet-in 0.28s ease-out;
  }

  .nucleo-notif-host .rt-notif-head {
    padding: 14px 16px 12px;
  }

  .nucleo-notif-host .rt-notif-head-actions {
    max-width: 58%;
    justify-content: flex-end;
  }

  .nucleo-notif-host .rt-notif-list {
    padding: 12px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .nucleo-notif-host .rt-notif-item-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .nucleo-notif-host .rt-notif-item-meta-right {
    flex-wrap: wrap;
    width: 100%;
  }

  .notif-pref-row .cfg-toggle-label { font-size: 15px; }
}

@keyframes nucleo-sheet-in {
  from { transform: translateY(100%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

.main { flex: 1; overflow-y: auto; background: var(--bg); min-height: 0; }

/* Monopoly Ronin â€” layout crÃ­tico mÃ³vil (tambiÃ©n en styles.css por si falla otro CSS) */
#app.inversion-mode {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #0a0e14 !important;
}
#app.inversion-mode .topbar,
#app.inversion-mode .ronin-voice-float {
  display: none !important;
}
#app.inversion-mode .main.inversion-active {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  padding: 0 !important;
  background: #0a0e14 !important;
}
#app.inversion-mode #view-inversion {
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.inversion-boot-hint {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: #848e9c;
  font-size: 15px;
  text-align: center;
}
.inversion-boot-spin {
  display: inline-block;
  animation: inversion-spin 0.9s linear infinite;
  color: #fdbf14;
  font-size: 1.25rem;
}
.inversion-boot-error { color: #f87171; }
@keyframes inversion-spin {
  to { transform: rotate(360deg); }
}
.main.home-active,
.main:has(.inicio-screen) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.screen-shell { padding: 16px; }

/* Chat: fill remaining app height (below topbar). Avoid Safari flex collapse
   where .chat-scroll with flex:1 + overflow and no min-height:0 becomes 0px. */
.app:has(> .main.chat-active) {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
.main.chat-active,
.main:has(.chat-screen) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  min-height: 0;
  flex: 1 1 auto;
}
.chat-screen {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
}
.chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.chat-footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 13, 23, 0.35);
  padding: 12px 16px calc(14px + var(--safe-bottom));
}
.chat-state {
  margin: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(17, 20, 34, 0.9);
  color: var(--text2);
  font-size: 14px;
  line-height: 1.45;
}
.chat-state strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 15px; }
.chat-state--error { border-color: rgba(248, 113, 113, 0.35); }
.chat-state--auth { border-color: rgba(251, 191, 36, 0.4); }
.chat-state--loading { border-color: rgba(139, 92, 246, 0.35); }
.chat-state-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.chat-state-actions .btn-primary-sm,
.chat-state-actions .btn-outline {
  min-height: 36px;
  padding: 8px 14px;
}
.conv-state {
  margin: 12px 4px;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(11, 13, 23, 0.45);
  color: var(--text2);
  font-size: 13px;
  line-height: 1.4;
}
.conv-state strong { display: block; color: var(--text); margin-bottom: 4px; }
.conv-state--error { border-color: rgba(248, 113, 113, 0.35); }
.conv-state--auth { border-color: rgba(251, 191, 36, 0.4); }
.conv-state-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

.welcome-hero {
  margin: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  min-height: 280px;
}
.welcome-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.welcome-hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,13,23,.92), rgba(11,13,23,.45)); }
.welcome-hero-content { position: relative; padding: 16px; z-index: 1; }
.welcome-hero h2 { font-size: 28px; font-weight: 700; line-height: 1.15; margin-bottom: 4px; }
.welcome-hero p { color: var(--text2); font-size: 14px; }
.welcome-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }
.welcome-meta.thinking { color: var(--purple-bright); }
.welcome-hub { width: 100%; height: 100px; object-fit: contain; margin-top: 12px; }
.mode-field { margin-top: 12px; }
.mode-field label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.mode-field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(11, 13, 23, 0.6);
  color: var(--text);
}

.compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
}
.compact-header .mode-label { color: var(--purple-bright); font-size: 12px; }
.compact-header .status-label { color: var(--muted); font-size: 12px; }
.compact-header .status-label.thinking { color: var(--purple-bright); }
.compact-header img { width: 48px; height: 48px; object-fit: contain; }

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
}

.msg-row { display: flex; padding: 0; }
.msg-row.user { justify-content: flex-end; }
.msg-row.assistant, .msg-row.error { justify-content: flex-start; }

.msg-bubble,
.msg-row .msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-row.user .msg-bubble,
.msg-row.user .msg {
  background: #8b5cf6;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-row.user .msg-action-btn {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

.msg-row.user .msg-action-btn.danger {
  color: #fecaca;
}

.msg-row.user.editing .msg-bubble,
.msg-row.user.editing .msg {
  outline: 2px solid var(--purple-bright, #a78bfa);
  outline-offset: 2px;
}

.msg-row.assistant .msg-bubble,
.msg-row.assistant .msg {
  background: rgba(20, 24, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.msg-row.error .msg-bubble { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }

.chat-editing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 12px 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: var(--purple-bright, #c4b5fd);
  font-size: 13px;
}
.chat-editing-cancel {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
}
.msg-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.msg-tag { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: rgba(15, 23, 42, 0.45); color: #c4b5fd; }
.msg-att-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.msg-att-img { max-width: min(220px, 100%); max-height: 180px; border-radius: 10px; object-fit: cover; border: 1px solid rgba(148, 163, 184, 0.25); }
.attach-chip--img { border-color: rgba(167, 139, 250, 0.45); }

.msg-row.user .msg-actions { opacity: 1; }

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text2);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.action-btn:hover {
  border-color: var(--purple);
  color: var(--purple-bright);
  background: var(--purple-dim);
}

.attach-strip { padding-bottom: 8px; }
.attach-strip .error-text { color: var(--red); font-size: 12px; margin-bottom: 4px; }
.attach-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--purple-dim);
  color: var(--purple-bright);
}
.attach-chip button { border: none; background: transparent; color: inherit; cursor: pointer; }

.input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(20, 24, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-bar:focus-within {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.input-bar .icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #a78bfa;
}

.input-bar .icon-btn:hover { background: rgba(139, 92, 246, 0.15); }
.input-bar .icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.input-bar .dictate-btn.active {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.input-bar textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  padding: 12px 0;
  border: none;
  background: transparent;
  resize: none;
  outline: none;
  font-size: 14px;
  color: var(--text);
}

.input-bar textarea::placeholder { color: var(--muted); }

.input-bar #btn-send {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #8b5cf6;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.input-bar #btn-send:hover { background: #7c3aed; }

.input-bar #btn-send svg { width: 18px; height: 18px; }

.input-bar .stop-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #f87171;
  font-size: 14px;
  font-weight: 700;
  margin-left: 4px;
}

.conv-new-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: var(--purple-dim);
  color: var(--purple-bright);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.conv-search-wrap { position: relative; margin-bottom: 8px; }
.conv-search-wrap input {
  width: 100%;
  padding: 12px 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(11, 13, 23, 0.35);
  outline: none;
}
.conv-search-wrap .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.conv-search-wrap .clear-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.conv-meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.conv-divider { height: 1px; background: var(--border); margin-bottom: 8px; }
.conv-group-label { font-size: 12px; color: var(--text2); padding: 12px 0 6px; }
.conv-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(11, 13, 23, 0.35);
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.conv-item.selected { background: var(--purple-dim); border-color: rgba(139, 92, 246, 0.5); }
.conv-item svg { flex-shrink: 0; margin-top: 2px; color: var(--muted); }
.conv-item.selected svg { color: var(--purple-bright); }
.conv-item-body { flex: 1; min-width: 0; }
.conv-item-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item-time { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.msg-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 8px;
  opacity: 0.55;
  transition: opacity 0.15s;
}

.msg-bubble:hover .msg-actions,
.msg-bubble:focus-within .msg-actions,
.msg-row.user .msg-actions {
  opacity: 1;
}

.msg-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
}

.msg-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.msg-action-btn.danger { color: #f87171; }
.stop-btn { color: #f87171; font-size: 16px; font-weight: 700; }
.conv-item-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.conv-item-row .conv-item {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.conv-delete {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.conv-delete:hover,
.conv-delete:focus-visible {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}
.conv-drawer-hint {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  margin: 12px 0 8px;
  opacity: 0.9;
}
.btn-clear-local-threads {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-clear-local-threads:hover {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
}

.card { background: var(--card-solid); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.card h3 { font-size: 14px; margin-bottom: 6px; font-weight: 600; }
.card p { font-size: 13px; color: var(--text2); line-height: 1.45; }

.list-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-solid);
  cursor: pointer;
  color: inherit;
}
.list-item h4 { font-size: 14px; margin-bottom: 4px; }
.list-item p { font-size: 12px; color: var(--muted); }
.progress-bar { height: 4px; background: rgba(255,255,255,.08); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--purple); }

.code-layout { display: flex; flex-direction: column; gap: 10px; }
.code-files { display: flex; gap: 6px; overflow-x: auto; }
.code-tab { flex-shrink: 0; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card-solid); font-size: 12px; cursor: pointer; color: var(--text2); }
.code-tab.active { border-color: var(--purple); color: var(--purple-bright); }
.code-editor { width: 100%; min-height: 240px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: #0d0f14; font-family: Consolas, monospace; font-size: 13px; color: var(--text); }

.task-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.task-item input { width: 18px; height: 18px; accent-color: var(--purple); }
.task-item.done span { text-decoration: line-through; color: var(--muted); }
.task-add { display: flex; gap: 8px; margin-top: 10px; }
.task-add input { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-solid); }

.btn-primary, .btn-outline, .btn-ghost, .btn-text, .btn-primary-sm, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 14px; border-radius: 10px; border: none; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-primary { background: var(--purple); color: #fff; width: 100%; }
.btn-primary-sm { background: var(--purple); color: #fff; padding: 8px 16px; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text2); width: 100%; }
.btn-ghost { background: transparent; color: var(--purple-bright); border: 1px solid rgba(139,92,246,.35); width: 100%; }
.btn-text { background: transparent; color: var(--purple-bright); }
.btn-danger { background: var(--red); color: #fff; }

.version-banner { font-size: 11px; padding: 8px 10px; border-radius: 10px; margin: 8px 16px; border: 1px solid var(--border); background: rgba(139,92,246,.08); }
.version-banner.synced { border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.08); }
.version-banner.outdated { border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.08); }

.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); padding: 16px; }
.modal-card { width: min(400px,100%); background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.modal-card h3 { margin-bottom: 8px; }
.modal-card p { font-size: 14px; color: var(--text2); margin-bottom: 14px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + var(--safe-bottom)); transform: translateX(-50%);
  background: var(--card-solid); border: 1px solid var(--border); padding: 10px 16px; border-radius: 999px; font-size: 13px; z-index: 110;
}

.attach-sheet { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; background: rgba(0,0,0,.55); }
.attach-sheet-card { width: 100%; background: var(--bg2); border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + var(--safe-bottom)); border: 1px solid var(--border); }
.attach-sheet-sub { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.attach-sheet-actions { display: flex; flex-direction: column; gap: 8px; }
.attach-sheet-close { margin-top: 12px; }

.ronin-voice-float {
  position: fixed;
  right: 16px;
  bottom: calc(88px + var(--safe-bottom));
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.45));
  transition: transform .2s ease, opacity .2s ease;
}
.ronin-voice-float img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(139,92,246,.55);
  background: rgba(18,12,32,.95);
  padding: 8px;
}
.ronin-voice-float-hint {
  font-size: 10px;
  color: #c4b5fd;
  background: rgba(10,10,20,.92);
  border: 1px solid rgba(139,92,246,.35);
  border-radius: 999px;
  padding: 2px 8px;
}
.ronin-voice-float.is-active img { border-color: #34d399; }
.ronin-voice-float.is-listening img { box-shadow: 0 0 0 4px rgba(139,92,246,.25); }
.ronin-voice-float.is-speaking img { border-color: #fbbf24; }

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--safe-bottom));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  cursor: pointer;
  z-index: 15;
}
.screen-shell.with-fab { padding-bottom: 80px; }

.view-toggle { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.constructor-remote-strip { grid-column: 1 / -1; display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid rgba(139,92,246,.28); border-radius:12px; background:rgba(139,92,246,.08); color:var(--text); }
.constructor-remote-strip > div { min-width:0; flex:1; display:flex; flex-direction:column; gap:2px; }
.constructor-remote-strip strong { font-size:12px; }
.constructor-remote-strip small { color:var(--text2); font-size:11px; line-height:1.35; }
.constructor-remote-dot { width:8px; height:8px; border-radius:50%; background:#4ade80; box-shadow:0 0 0 4px rgba(74,222,128,.12); flex:none; }
@media (max-width: 620px) { .constructor-remote-strip { align-items:flex-start; flex-wrap:wrap; } .constructor-remote-strip .action-chip { margin-left:18px; } }
.constructor-ide { gap: 14px; }
.constructor-ide .codigo-editor-panel,
.constructor-ide .codigo-terminal-panel,
.constructor-ide .codigo-files-drawer,
.constructor-ide .preview-panel { border-color: rgba(255,255,255,.11); box-shadow: 0 10px 30px rgba(0,0,0,.16); }
.constructor-ide .codigo-editor-head,
.constructor-ide .codigo-terminal-header { padding: 8px 12px 0; background: rgba(21,23,34,.96); }
.constructor-ide .codigo-editor-body { min-height: 360px; }
.constructor-ide .codigo-textarea { line-height: 1.65; font-size: 13px; }
.constructor-ide .codigo-cmd-form { margin: 10px; border-radius: 10px; background: rgba(255,255,255,.04); }
.constructor-ide .codigo-ai-row { padding-top: 2px; }
.project-card { background: var(--bg2); border-radius: 16px; margin-bottom: 10px; overflow: hidden; border: 1px solid var(--border); }
.project-card.compact { border: 1px solid var(--border); background: var(--bg2); border-radius: 14px; padding: 12px; text-align: left; cursor: pointer; color: inherit; width: 100%; }
.project-card-main { display: block; width: 100%; padding: 16px; border: none; background: transparent; text-align: left; color: inherit; cursor: pointer; }
.project-type { font-size: 11px; color: var(--purple-bright); margin-bottom: 4px; }
.project-card h4 { font-size: 15px; margin-bottom: 6px; }
.project-card p { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.project-pct { font-size: 12px; color: var(--text2); }
.project-slider { width: calc(100% - 32px); margin: 0 16px 8px; accent-color: var(--purple); }
.project-actions { display: flex; gap: 8px; padding: 0 16px 12px; }
.action-chip { border: none; background: var(--purple-dim); color: var(--purple-bright); padding: 6px 12px; border-radius: 999px; font-size: 12px; cursor: pointer; }
.action-chip.danger { color: var(--red); background: rgba(248,113,113,.12); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.section-label { font-size: 13px; color: var(--text2); margin: 16px 0 8px; }
.workspace-desc { color: var(--text2); margin-bottom: 8px; line-height: 1.45; }
.inline-dialog { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-top: 12px; }
.inline-dialog label { display: block; margin: 8px 0; font-size: 12px; color: var(--text2); }
.inline-dialog input, .inline-dialog select, .inline-dialog textarea { width: 100%; margin-top: 4px; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-solid); }
.inline-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.card label { display: block; margin: 8px 0; font-size: 12px; color: var(--text2); }
.card input, .card textarea { width: 100%; margin-top: 4px; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: rgba(11,13,23,.5); }
.bot-msgs { max-height: 120px; overflow-y: auto; margin: 8px 0; font-size: 12px; color: var(--text2); }
.bot-msg { margin-bottom: 4px; }

.tab-row { display: flex; gap: 4px; margin-bottom: 12px; background: var(--bg2); border-radius: 12px; padding: 4px; }
.tab-row-scroll { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
.tab-row-scroll .tab-btn { flex: 0 0 auto; white-space: nowrap; }
.hint-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--text2); }
.hint-list li { margin-bottom: 6px; }
.tab-btn { flex: 1; border: none; background: transparent; color: var(--text2); padding: 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.tab-btn.active { background: var(--purple-dim); color: var(--text); }
.hint-text { font-size: 12px; color: var(--muted); margin-top: 8px; }

.stat-card { background: var(--bg2); border-radius: 14px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--border); }
.stat-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.stat-card strong { font-size: 16px; }

.file-tree { background: var(--bg2); border-radius: 12px; padding: 8px; margin-bottom: 8px; border: 1px solid var(--border); max-height: 160px; overflow-y: auto; }
.tree-folder, .tree-file { display: block; width: 100%; text-align: left; border: none; background: transparent; color: var(--text2); padding: 6px 4px; cursor: pointer; font-size: 13px; }
.tree-file.active { color: var(--purple-bright); background: var(--purple-dim); border-radius: 6px; }
.code-active-label { color: var(--purple-bright); font-family: Consolas, monospace; font-size: 12px; margin-bottom: 4px; }
.inline-input { flex: 1; min-width: 100px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card-solid); font-size: 12px; }
.terminal-panel { background: #0d0f14; border-radius: 10px; padding: 10px; margin: 8px 0; border: 1px solid var(--border); }
.terminal-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.terminal-panel pre { color: var(--green); font-size: 12px; font-family: Consolas, monospace; white-space: pre-wrap; margin: 0; }
.preview-panel { margin: 8px 0; }
.preview-label { color: var(--purple-bright); font-size: 12px; margin-bottom: 6px; }
.preview-box { background: var(--bg2); border-radius: 12px; padding: 16px; border: 1px solid var(--border); }
.preview-btn { display: inline-block; margin-top: 8px; padding: 6px 16px; border-radius: 8px; background: rgba(139,92,246,.3); color: var(--purple-bright); font-size: 13px; }
.task-del { padding: 4px 8px; min-width: auto; }
.task-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.task-item label { display: flex; align-items: center; gap: 10px; flex: 1; }

.empty { text-align: center; color: var(--muted); font-size: 13px; padding: 24px; }

.msg-row.assistant .msg.msg-thinking {
  max-width: min(320px, 88vw);
  padding: 10px 14px;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  background: rgba(20, 24, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.msg-thinking .thinking-bubble {
  opacity: 0.85;
  font-style: italic;
  animation: thinking-pulse 1.4s ease-in-out infinite;
}

@keyframes thinking-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: var(--bg2);
}
.login-screen.hidden { display: none; }
.login-card {
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 32px 24px;
  padding-top: calc(32px + var(--safe-top));
  padding-bottom: calc(32px + var(--safe-bottom));
  border-radius: 0;
  border: none;
  background: var(--bg2);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.login-form {
  width: 100%;
  max-width: 420px;
}
.login-logo { display: block; margin: 0 auto 12px; }
.login-card h1 { text-align: center; font-size: 24px; margin-bottom: 4px; }
.login-sub { text-align: center; color: var(--text2); font-size: 13px; margin-bottom: 16px; }
.login-form label { display: block; font-size: 12px; color: var(--text2); margin: 10px 0 4px; }
.login-form input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
}
.password-toggle:hover { color: var(--text); }
.password-toggle .icon-eye-closed { display: none; }
.password-toggle.is-visible .icon-eye-open { display: none; }
.password-toggle.is-visible .icon-eye-closed { display: block; }
.login-error { color: var(--red); font-size: 14px; margin-top: 12px; font-weight: 700; min-height: 20px; text-align: center; }
.login-error.login-error--info { color: #c4b5fd; font-weight: 600; }
.login-error.hidden { display: none; }
.login-submit {
  width: 100%;
  margin-top: 16px;
  min-height: 48px;
  font-size: 16px;
  -webkit-tap-highlight-color: rgba(139, 92, 246, 0.35);
  touch-action: manipulation;
  position: relative;
  z-index: 5;
}
.login-submit.hidden { display: none; }
.login-screen { z-index: 5000; }
body:has(#login-screen:not(.hidden)) .ronin-voice-float {
  display: none !important;
}
.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
}
.login-remember input { width: auto; margin: 0; accent-color: var(--purple); }
.login-identity-summary {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
}
.login-identity-summary p { margin: 0 0 6px; font-size: 13px; color: var(--text); }
.login-identity-summary.hidden,
#login-identity.hidden { display: none; }
.login-forgot-wrap { text-align: right; margin: 6px 0 0; }
.link-btn {
  background: none;
  border: none;
  color: var(--purple);
  cursor: pointer;
  font-size: 12px;
  padding: 8px 4px;
  min-height: 44px;
  text-decoration: underline;
}
.login-recovery { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.login-recovery.hidden { display: none; }
.login-hint { font-size: 11px; color: var(--text2); margin: 4px 0 8px; }
.login-recover-btn { width: 100%; margin-top: 12px; }
.login-back-btn { display: block; margin: 10px auto 0; }
.app.hidden { visibility: hidden; pointer-events: none; height: 0; overflow: hidden; }

/* ===== Pantalla Inicio â€” referencia pantalla inicio.png ===== */
.inicio-screen {
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.inicio-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
.inicio-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 14px 12px;
  box-sizing: border-box;
}
.inicio-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 200px;
  border: 1px solid rgba(139, 92, 246, 0.18);
}
.inicio-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.inicio-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(8, 8, 16, 0.92) 0%, rgba(8, 8, 16, 0.55) 42%, rgba(8, 8, 16, 0.25) 100%);
}
.inicio-hero-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(12, 12, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.inicio-hero-badge strong { display: block; font-size: 10px; }
.inicio-hero-badge-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--green);
  font-weight: 600;
}
.inicio-hero-badge.offline .inicio-hero-badge-status { color: var(--red); }
.inicio-hero-body {
  position: relative;
  z-index: 1;
  padding: 22px 18px 24px;
}
.inicio-time { font-size: 14px; color: var(--purple-bright); margin: 0 0 4px; }
.inicio-name { font-size: 30px; font-weight: 700; color: #fff; margin: 0 0 8px; line-height: 1.1; }
.inicio-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 16px;
}
.inicio-wave { width: 26px; height: 12px; color: var(--purple-bright); flex-shrink: 0; }
.inicio-speak-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px 9px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 18, 0.72);
  color: #fff;
  cursor: pointer;
  text-align: left;
}
.inicio-speak-mic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-bright), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.inicio-speak-text { display: flex; flex-direction: column; gap: 2px; }
.inicio-speak-text strong { font-size: 13px; }
.inicio-speak-text small { font-size: 10px; color: rgba(255, 255, 255, 0.55); }
.inicio-version-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.inicio-version-col { min-width: 0; }
.inicio-version-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 6px;
}
.inicio-version-head svg { width: 14px; height: 14px; color: var(--purple-bright); }
.inicio-version-value { font-size: 18px; font-weight: 700; margin-bottom: 4px; word-break: break-word; }
.inicio-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple-bright);
  font-size: 9px;
  font-weight: 600;
}
.inicio-tag-update {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
}
.inicio-update-popup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(17, 20, 34, 0.95));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.inicio-update-popup-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.22);
  color: var(--purple-bright);
  font-size: 18px;
  flex-shrink: 0;
}
.inicio-update-popup-body { flex: 1; min-width: 0; }
.inicio-update-popup-body strong { display: block; font-size: 13px; margin-bottom: 2px; }
.inicio-update-popup-body p { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.35; }
.inicio-update-popup-btn {
  flex-shrink: 0;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  cursor: pointer;
}
.inicio-version-note { font-size: 9px; color: var(--muted); margin: 6px 0 0; }
.inicio-version-divider { width: 1px; background: var(--border); min-height: 64px; }
.inicio-version-details {
  grid-column: 1 / -1;
  border: none;
  background: none;
  color: var(--purple-bright);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  padding: 0;
}
.inicio-section-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 600;
}
.inicio-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.inicio-quick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 100px;
  padding: 12px 10px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid rgba(139, 92, 246, 0.14);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.inicio-quick-chevron { position: absolute; top: 8px; right: 8px; color: var(--muted); font-size: 13px; }
.inicio-quick-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(139, 92, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.inicio-quick-card strong { font-size: 12px; }
.inicio-quick-card small { font-size: 9px; color: var(--muted); line-height: 1.3; }
.inicio-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: 140px;
  align-items: stretch;
}
.inicio-panel {
  padding: 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.inicio-panel h3 { margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.inicio-vps-host { margin: -6px 0 12px; font-size: 11px; color: var(--text-muted); }
.inicio-activity-list, .inicio-status-list { list-style: none; margin: 0; padding: 0; }
.inicio-activity-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.inicio-activity-list li:last-child { border-bottom: none; }
.inicio-activity-label { display: block; font-size: 9px; color: var(--muted); }
.inicio-activity-list strong { font-size: 11px; color: var(--purple-bright); font-weight: 600; }
.inicio-activity-time { font-size: 9px; color: var(--muted); white-space: nowrap; }
.inicio-panel-link {
  margin-top: 8px;
  border: none;
  background: none;
  color: var(--purple-bright);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}
.inicio-status-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 11px;
  color: var(--text2);
}
.inicio-status-list li:last-child { border-bottom: none; }
.inicio-status-meta { text-align: right; }
.inicio-status-meta small { display: block; font-size: 9px; color: var(--muted); }
.inicio-ok { color: var(--green) !important; }
.inicio-warn { color: var(--red) !important; }

.health-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.health-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.health-row.health-ok .health-dot { background: var(--green); }
.health-row.health-err .health-dot { background: var(--red); }
.health-row.health-warn .health-dot { background: #f59e0b; }
.health-row.health-ok .health-value { color: var(--green); }
.health-row.health-err .health-value { color: var(--red); }
.health-row.health-warn .health-value { color: #f59e0b; }
.health-label { color: var(--text2); }
.device-scope-hint { margin-bottom: 12px; }
.inicio-check-btn {
  margin-top: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.08);
  color: var(--purple-bright);
  font-size: 11px;
  cursor: pointer;
}
.inicio-footer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
  border-radius: 0;
  background: var(--card);
  border: none;
  border-top: 1px solid var(--border);
  color: var(--text2);
  font-size: 12px;
  flex-shrink: 0;
}
.inicio-footer-bar span { flex: 1; }
@media (max-width: 720px) {
  .inicio-panels { grid-template-columns: 1fr; }
  .inicio-inner { padding: 8px 12px 10px; }
}

.inicio-footer-mic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--purple-bright), var(--purple));
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== Pantalla CÃ³digo (estilo escritorio) ===== */
.codigo-page { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.codigo-editor-panel { background: #0a0c12; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.codigo-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px 0; background: #0d0f16; border-bottom: 1px solid var(--border); }
.codigo-editor-tabs { display: flex; gap: 2px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; }
.codigo-editor-tabs::-webkit-scrollbar { display: none; }
.codigo-file-tab { display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px; border: none; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; cursor: pointer; border-radius: 8px 8px 0 0; }
.codigo-file-tab.active { background: #12151e; color: var(--text); border: 1px solid var(--border); border-bottom-color: #12151e; }
.codigo-file-tab-add { color: var(--purple-bright); font-size: 16px; }
.codigo-tab-brace { color: #f59e0b; font-weight: 700; }
.codigo-editor-toolbar { display: flex; gap: 4px; flex-shrink: 0; }
.codigo-tool-btn { width: 32px; height: 32px; border: none; border-radius: 8px; background: rgba(255,255,255,0.05); color: var(--text2); cursor: pointer; font-size: 14px; }
.codigo-editor-body { display: flex; min-height: 200px; }
.codigo-gutter { padding: 12px 8px; background: #080810; color: var(--muted); font-family: Consolas, monospace; font-size: 12px; line-height: 1.45; text-align: right; user-select: none; border-right: 1px solid var(--border); white-space: pre; }
.codigo-textarea { flex: 1; min-height: 200px; padding: 12px; border: none; background: #0d0f14; color: var(--text); font-family: Consolas, monospace; font-size: 13px; line-height: 1.45; resize: vertical; outline: none; }
.codigo-terminal-panel { background: #0a0c12; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.codigo-terminal-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #0d0f16; border-bottom: 1px solid var(--border); }
.codigo-terminal-tabs { display: flex; gap: 8px; }
.codigo-term-tab { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.codigo-term-tab.active { color: var(--purple-bright); }
.codigo-shell-path { font-size: 11px; color: var(--muted); font-family: Consolas, monospace; }
.codigo-terminal-output { margin: 0; padding: 10px 12px; min-height: 100px; max-height: 180px; overflow: auto; color: var(--green); font-family: Consolas, monospace; font-size: 12px; white-space: pre-wrap; background: #080810; }
.codigo-cmd-form { display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--border); background: #0d0f16; }
.codigo-cmd-form input { flex: 1; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: #080810; color: var(--text); font-size: 14px; }
.codigo-cmd-send { width: 40px; height: 40px; border: none; border-radius: 8px; background: var(--purple); color: #fff; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.codigo-files-drawer { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: var(--card); }
.codigo-files-drawer summary { cursor: pointer; color: var(--purple-bright); font-size: 13px; font-weight: 600; }
.codigo-ai-row { flex-wrap: wrap; }

.dictate-btn.active { color: var(--red) !important; background: rgba(239, 68, 68, 0.15) !important; }

/* ===== User profile (VPS) — Memoria de Ronin ===== */
.memoria-shell { gap: 12px; padding-bottom: 24px; }
.memoria-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.memoria-header-icon { width: 34px; height: 34px; border-radius: 10px; background: rgba(139,92,246,.18); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.memoria-header-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--text); }
.memoria-header-sub { margin: 2px 0 0; font-size: 12px; color: var(--text2); }

.user-hero-card { border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); background: linear-gradient(135deg, #1a1033, #12182a 55%, #0e1424); }
.user-hero-card-inner { display: flex; align-items: center; gap: 12px; padding: 14px; }
.user-hero-copy { flex: 1; min-width: 0; }
.user-hero-bot { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; }
.user-sync-badge { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 11px; color: #22c55e; }
.user-sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }

.user-control-card { padding: 14px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.user-control-top { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.user-control-top strong { display: block; color: var(--text); font-size: 14px; }
.user-control-top p { margin: 2px 0 0; font-size: 12px; color: var(--text2); }
.user-control-icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(139,92,246,.15); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.user-control-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.user-btn-primary, .user-btn-outline { border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; }
.user-btn-primary { background: var(--purple); color: #fff; }
.user-btn-primary.active { background: rgba(139,92,246,.35); }
.user-btn-outline { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.12); }
.user-forget-link { display: block; width: 100%; margin-top: 10px; text-align: right; background: none; border: none; color: #ef4444; font-size: 12px; cursor: pointer; }

.user-primary-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.user-primary-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 72px; padding: 8px 12px; border: none; border-radius: 10px; background: transparent; color: var(--text2); font-size: 11px; cursor: pointer; position: relative; }
.user-primary-tab.active { background: rgba(139,92,246,.15); color: var(--text); }
.user-primary-tab.active::after { content: ''; position: absolute; bottom: 0; width: 28px; height: 2px; border-radius: 99px; background: var(--purple-bright); }
.user-primary-tab-icon svg { width: 18px; height: 18px; display: block; }

.user-explore-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.04); color: inherit; text-align: left; cursor: pointer; }
.user-explore-card-copy { flex: 1; }
.user-explore-card-copy strong { display: block; color: var(--text); font-size: 14px; }
.user-explore-card-copy small { display: block; margin-top: 2px; color: var(--text2); font-size: 11px; }
.user-explore-card-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(139,92,246,.15); display: flex; align-items: center; justify-content: center; color: var(--purple-bright); font-size: 18px; }
.user-explore-back { background: none; border: none; color: var(--purple-bright); font-size: 14px; font-weight: 600; padding: 4px 0; cursor: pointer; }

.user-section-title { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.user-data-card { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: rgba(255,255,255,.04); }
.user-data-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.user-data-row + .user-data-row { border-top: 1px solid rgba(255,255,255,.06); }
.user-data-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(139,92,246,.15); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.user-data-body { flex: 1; min-width: 0; }
.user-data-label { display: block; font-size: 11px; color: var(--text2); margin-bottom: 2px; }
.user-data-value { width: 100%; border: none; background: transparent; color: var(--text); font-size: 14px; font-weight: 600; padding: 0; }
.user-data-value:disabled { opacity: 1; }
.user-data-edit { color: var(--purple-bright); font-size: 14px; }

.user-info-card { display: flex; gap: 12px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.user-info-card strong { display: block; color: var(--text); font-size: 14px; }
.user-info-card p { margin: 4px 0 0; font-size: 12px; color: var(--text2); line-height: 1.45; }
.user-info-icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(139,92,246,.15); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.user-info-link { margin-top: 8px; background: none; border: none; padding: 0; color: var(--purple-bright); font-size: 12px; font-weight: 600; cursor: pointer; }

.user-explore-sheet { position: fixed; inset: 0; z-index: 1200; }
.user-explore-sheet.hidden { display: none; }
.user-explore-sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.user-explore-sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px 28px; border-radius: 16px 16px 0 0; background: #111422; border-top: 1px solid var(--border); }
.user-explore-sheet-panel h3 { margin: 0; color: var(--text); }
.user-explore-sheet-panel p { margin: 4px 0 12px; font-size: 12px; color: var(--text2); }
.user-explore-sheet-item { width: 100%; text-align: left; padding: 14px; margin-bottom: 8px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text); cursor: pointer; }

.user-shell { gap: 12px; }
.user-hero { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.user-hero-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, var(--purple)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; background-size: cover; background-position: center; }
.user-hero-name { font-size: 20px; font-weight: 700; margin: 0; }
.user-hero-role { font-size: 12px; color: var(--text2); margin: 4px 0 0; }
.user-core-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.user-core-stat { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--border); }
.user-core-stat span { display: block; font-size: 10px; color: var(--text2); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.user-core-stat strong { font-size: 15px; color: var(--text); }
.user-subtitle { font-size: 12px; color: var(--muted); margin: 0; }
.user-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.user-tool-btn { padding: 8px 12px; font-size: 12px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text2); }
.user-tool-btn.active, .user-tool-btn:hover { color: var(--text); border-color: rgba(139,92,246,0.35); background: rgba(139,92,246,0.12); }
.user-tool-btn.danger:hover { color: #fca5a5; border-color: rgba(239,68,68,0.35); }
.user-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.user-tab { padding: 7px 10px; font-size: 11px; border-radius: 8px; border: none; background: transparent; color: var(--muted); white-space: nowrap; }
.user-tab.active { background: rgba(139,92,246,0.18); color: var(--text); }
.user-field-label { display: block; margin: 10px 0 4px; font-size: 12px; color: var(--text2); }
.user-field { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 14px; }
.user-field:disabled { opacity: 0.85; }
.user-hint { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.user-mem-item { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); margin-bottom: 8px; font-size: 12px; }
.user-mem-actions { display: flex; gap: 6px; margin-top: 8px; }
.user-mem-btn { font-size: 11px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text2); }
.user-mem-btn.danger { color: #fca5a5; }
.user-save-row { margin-top: 12px; }
.user-save-row.hidden { display: none; }
.user-feedback { font-size: 12px; color: var(--green); margin-top: 6px; }
.user-panel.hidden { display: none; }

/* ===== Vida + UI pÃ¡ginas (portado escritorio) ===== */
.vida-subtitle,.vida-stat-label,.vida-stat-sub,.vida-timeline-when,.vida-timeline-item p,.vida-summary-label,.vida-highlight-item span,.vida-places-list strong { color: var(--text2); }
.vida-title,.vida-timeline-item h3,.vida-card-title,.vida-summary-value { color: var(--text); }
.vida-link-btn,.vida-btn-insights { color: var(--purple-bright); }
.vida-shell { position: relative; }
.main.vida-active { overflow: hidden; }
.ronin-page-header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:14px; }
.ronin-page-header-left { display:flex; gap:14px; align-items:flex-start; }
.ronin-page-icon { width:44px; height:44px; border-radius:50%; background:linear-gradient(135deg,rgba(139,92,246,.35),rgba(109,40,217,.2)); border:1px solid rgba(167,139,250,.35); display:flex; align-items:center; justify-content:center; color:#e9d5ff; flex-shrink:0; }
.ronin-page-icon svg { width:22px; height:22px; }
.ronin-page-title { font-size:22px; font-weight:700; margin:0; }
.ronin-page-subtitle { font-size:12px; color:var(--text2); margin:4px 0 0; line-height:1.45; }
.cfg-card { background:rgba(255,255,255,.03); border:1px solid var(--border); border-radius:14px; padding:16px; margin-bottom:12px; }
.cfg-card-wide { max-width:100%; }
.cfg-card-title { font-size:14px; font-weight:600; margin:0 0 12px; color:var(--text); }
.ronin-stat-card { padding:14px 16px; border-radius:14px; background:rgba(255,255,255,.03); border:1px solid var(--border); margin-bottom:10px; }
.ronin-stat-label { display:block; font-size:11px; color:var(--text2); }
.ronin-stat-value { display:block; font-size:20px; font-weight:700; margin-top:4px; }
.ronin-stat-sub { display:block; font-size:11px; color:var(--muted); margin-top:4px; }
.ronin-stat-bar { height:5px; border-radius:999px; background:rgba(255,255,255,.06); margin-top:8px; overflow:hidden; }
.ronin-stat-bar span { display:block; height:100%; background:linear-gradient(90deg,#7c3aed,#c084fc); border-radius:inherit; }
.ronin-stats-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.settings-scroll,.conn-scroll,.perf-scroll { display:flex; flex-direction:column; gap:0; }

/* Ajustes — toggles paridad escritorio */
.cfg-subtitle { font-size:13px; font-weight:600; color:var(--text); margin:0 0 8px; }
.cfg-meta { font-size:12px; color:var(--text2); margin:6px 0 10px; line-height:1.45; }
.cfg-divider { height:1px; background:var(--border); margin:16px 0; }
.cfg-feedback { font-size:12px; margin-top:8px; color:var(--text2); }
.cfg-push-block { margin-bottom:4px; }
.cfg-push-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.cfg-btn-primary-sm {
  display:inline-flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:600; padding:10px 16px; border-radius:10px;
  border:none; cursor:pointer;
  background:linear-gradient(135deg,#7c3aed,#8b5cf6); color:#fff;
}
.cfg-btn-full { width:100%; margin-top:12px; }
.cfg-toggle-row {
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:12px; padding:12px 0; border-bottom:1px solid rgba(255,255,255,.06);
}
.cfg-toggle-row:last-child { border-bottom:none; }
.cfg-toggle-label { display:block; font-size:14px; font-weight:500; color:var(--text); }
.cfg-toggle { position:relative; width:44px; height:26px; flex-shrink:0; cursor:pointer; }
.cfg-toggle input { opacity:0; width:0; height:0; position:absolute; }
.cfg-toggle-track {
  position:absolute; inset:0; border-radius:999px;
  background:rgba(255,255,255,.12); transition:background .2s;
}
.cfg-toggle-track::before {
  content:''; position:absolute; width:20px; height:20px; left:3px; top:3px;
  border-radius:50%; background:#fff; transition:transform .2s;
  box-shadow:0 1px 3px rgba(0,0,0,.25);
}
.cfg-toggle input:checked + .cfg-toggle-track { background:linear-gradient(135deg,#7c3aed,#8b5cf6); }
.cfg-toggle input:checked + .cfg-toggle-track::before { transform:translateX(18px); }
.notif-prefs-list { margin-top:4px; }
.notif-pref-row { align-items:flex-start; }
.notif-pref-row .cfg-toggle { margin-top:2px; }
.notif-pref-row .cfg-meta { margin:4px 0 0; font-size:11px; }
/* ===== Vida â€” memoria inteligente (referencia) ===== */
.app-body.vida-mode .right-panel { display: none; }

.app-body.vida-mode .main-panel {
  padding: 0 16px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#view-vida.active {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vida-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  min-height: 0;
  gap: 18px;
  padding: 2px 0 0;
  position: relative;
  overflow: hidden;
}

.vida-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 2px;
}

.vida-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* â€” Header â€” */
.vida-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: 0 6px;
}

.vida-header-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.vida-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(109, 40, 217, 0.2));
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #e9d5ff;
}

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

.vida-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.vida-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 5px;
  max-width: 520px;
  line-height: 1.5;
}

.vida-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  transition: filter 0.15s;
}

.vida-btn-primary svg { width: 15px; height: 15px; }
.vida-btn-primary:hover { filter: brightness(1.1); }

.vida-header-actions { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.vida-btn-outline {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.35); background: rgba(139, 92, 246, 0.08);
  color: var(--purple-bright); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.vida-btn-outline svg { width: 15px; height: 15px; }
.vida-btn-outline:hover { background: rgba(139, 92, 246, 0.15); }
.vida-empty-inline { color: var(--text-muted); font-size: 13px; padding: 16px 0; }
.vida-drafts-home { margin: 0 16px 16px; padding: 16px; }
.vida-draft-row,
.vida-project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.vida-draft-row:first-child,
.vida-project-row:first-child { border-top: none; }
.vida-draft-row--latest {
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 12px;
  padding: 12px;
  background: rgba(124, 58, 237, 0.1);
}
.vida-draft-row p,
.vida-project-row p { margin: 4px 0; color: var(--text-secondary, #c4c4d4); font-size: 13px; }
.vida-draft-row small,
.vida-project-row small,
.vnp-save-status { color: var(--text-muted); font-size: 12px; }
.vida-projects-card { margin-top: 0; }
.momento-delete {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.momento-delete:hover { color: #f87171; background: rgba(248, 113, 113, 0.1); }
.vida-examples-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vida-examples-banner.hidden { display: none !important; }
.vida-examples-banner span { color: var(--purple-bright); font-size: 13px; font-weight: 600; }
.vida-examples-banner small { color: var(--text-muted); font-size: 11px; }
.vida-np.hidden { display: none !important; }
#vida-create-view { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }

/* Rendimiento — estilo Aprendizaje / Trading Lab */
.perf-analysis-page {
  --pf-bg: #0a0c12; --pf-line: rgba(255,255,255,.07); --pf-cyan: #00e5ff; --pf-gold: #ecc23a; --pf-green: #35c76a;
  --pf-txt: #e9ebf4; --pf-muted: #7a8096; --pf-dim: #5b6079;
  padding: 4px 0 30px;
  background:
    radial-gradient(ellipse 80% 45% at 8% -8%, rgba(0,229,255,.08), transparent 55%),
    radial-gradient(ellipse 55% 35% at 92% 0%, rgba(236,194,58,.05), transparent 50%),
    transparent;
  color: var(--pf-txt);
}
.perf-overview {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px; margin: 12px 0;
  border: 1px solid var(--pf-line); border-radius: 16px;
  background: linear-gradient(160deg, #12131f, #0d0e1a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.perf-overview > div { display: grid; gap: 3px; }
.perf-overview span { color: var(--pf-dim); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.perf-overview strong { color: var(--pf-cyan); font-size: 28px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.perf-overview small { color: var(--pf-muted); font-size: 11px; }
.perf-all {
  min-width: 160px; font-weight: 800; color: #041016 !important;
  background: linear-gradient(135deg, #00e5ff, #22d3ee) !important;
  border: 1px solid rgba(0,229,255,.55) !important;
  box-shadow: 0 0 18px rgba(0,229,255,.22);
}
.perf-analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.perf-analysis-card {
  border: 1px solid var(--pf-line); border-radius: 16px;
  background: linear-gradient(160deg, #12131f, #0d0e1a); padding: 14px; min-width: 0;
}
.perf-analysis-card:hover { border-color: rgba(0,229,255,.32); box-shadow: 0 0 16px rgba(0,229,255,.06); }
.perf-analysis-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.perf-analysis-card h3 {
  color: #94a3b8; font-size: 11px; margin: 0 0 4px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
}
.perf-analysis-card header span { color: var(--pf-cyan); font-size: 12px; font-weight: 800; }
.perf-action {
  padding: 8px 10px; font-size: 11px; white-space: nowrap; font-weight: 800;
  color: var(--pf-cyan) !important; background: rgba(0,229,255,.08) !important;
  border: 1px solid rgba(0,229,255,.3) !important; border-radius: 8px;
}
.perf-metrics { display: grid; gap: 7px; }
.perf-metric {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px;
  padding: 8px; border-radius: 9px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.04);
}
.perf-metric span { color: var(--pf-muted); font-size: 11px; }
.perf-metric strong { color: var(--pf-txt); font-size: 12px; text-align: right; overflow-wrap: anywhere; font-family: "JetBrains Mono", ui-monospace, monospace; }
.perf-metric small { grid-column: 1 / -1; color: var(--pf-dim); font-size: 9px; }
.perf-error { color: #ef4655; font-size: 11px; margin: 7px 0; overflow-wrap: anywhere; }
.perf-spinner { display: inline-block; width: 11px; height: 11px; border: 2px solid rgba(4,16,22,.35); border-top-color: #041016; border-radius: 50%; animation: perf-spin .75s linear infinite; vertical-align: -2px; }
@keyframes perf-spin { to { transform: rotate(360deg); } }
.perf-history {
  margin-top: 18px; border: 1px solid var(--pf-line); border-radius: 16px;
  background: linear-gradient(160deg, #12131f, #0d0e1a); padding: 14px;
}
.perf-history h3 { margin: 0 0 10px; color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.perf-history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--pf-line); }
.perf-history-row:first-of-type { border-top: 0; }
.perf-history-row > div { display: grid; gap: 2px; }
.perf-history-row strong { color: var(--pf-txt); font-size: 12px; }
.perf-history-row small { color: var(--pf-muted); font-size: 10px; }
.perf-history-row > span { color: var(--pf-cyan); font-weight: 700; font-size: 12px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.perf-history-row em { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 8px; }
.perf-history-row em.ok { color: var(--pf-green); background: rgba(53,199,106,.12); border: 1px solid rgba(53,199,106,.28); }
.perf-history-row em.partial { color: var(--pf-gold); background: rgba(236,194,58,.12); border: 1px solid rgba(236,194,58,.3); }
.perf-analysis-page button:disabled { cursor: not-allowed; opacity: .65; }

.perf-activity, .perf-alerts-block, .perf-energy { margin-top: 14px; }
.perf-alerts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.perf-alert { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--pf-line); font-size: 12px; }
.perf-alert em { font-style: normal; color: var(--pf-muted); font-size: 10px; white-space: nowrap; }
.perf-alert--ok { border-color: rgba(53,199,106,.28); background: rgba(53,199,106,.08); }
.perf-alert--warn, .perf-alert--partial { border-color: rgba(236,194,58,.3); background: rgba(236,194,58,.08); }
.perf-alert--error { border-color: rgba(239,70,85,.35); background: rgba(239,70,85,.1); }
.perf-alert--info { border-color: var(--pf-line); }

.perf-recommendations {
  margin-top: 18px; padding: 16px; border: 1px solid var(--pf-line); border-radius: 16px;
  background: linear-gradient(160deg, #12131f, #0d0e1a);
}
.perf-rec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.perf-rec-head h3 { margin: 0; color: #94a3b8; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.perf-rec-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.perf-rec-chip { font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--pf-line); }
.perf-rec-chip.safe { color: var(--pf-green); border-color: rgba(53,199,106,.3); background: rgba(53,199,106,.1); }
.perf-rec-chip.confirm { color: var(--pf-gold); border-color: rgba(236,194,58,.35); background: rgba(236,194,58,.1); }
.perf-rec-chip.info { color: var(--pf-muted); }
.perf-rec-list { display: grid; gap: 10px; }
.perf-rec-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--pf-line); background: rgba(0,0,0,.2);
}
.perf-rec-icon { font-size: 20px; line-height: 1; margin-top: 2px; }
.perf-rec-body { display: grid; gap: 4px; min-width: 0; }
.perf-rec-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.perf-rec-body strong { color: var(--pf-txt); font-size: 13px; }
.perf-rec-body > span { color: var(--pf-muted); font-size: 12px; line-height: 1.4; }
.perf-rec-impact, .perf-rec-platform { color: var(--pf-dim); font-size: 11px; }
.perf-rec-platform { font-style: italic; }
.perf-rec-risk { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; font-style: normal; }
.perf-rec-risk--safe { color: var(--pf-green); background: rgba(53,199,106,.12); border: 1px solid rgba(53,199,106,.28); }
.perf-rec-risk--confirm { color: var(--pf-gold); background: rgba(236,194,58,.12); border: 1px solid rgba(236,194,58,.3); }
.perf-rec-risk--info { color: var(--pf-muted); background: rgba(255,255,255,.04); border: 1px solid var(--pf-line); }
.perf-rec-btn {
  padding: 8px 12px; font-size: 11px; font-weight: 800; white-space: nowrap;
  color: var(--pf-cyan) !important; background: rgba(0,229,255,.08) !important; border: 1px solid rgba(0,229,255,.35) !important; border-radius: 8px;
}
.perf-rec-info-tag { font-size: 10px; color: var(--pf-dim); font-style: italic; white-space: nowrap; padding-top: 4px; }
.perf-rec-log-title { margin: 16px 0 8px; font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; }
.perf-rec-log { display: grid; gap: 6px; }

@media (max-width: 900px) {
  .perf-analysis-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .perf-overview { align-items: stretch; flex-direction: column; }
  .perf-all { width: 100%; }
  .perf-analysis-card header { align-items: stretch; flex-direction: column; }
  .perf-action { width: 100%; }
}

/* â€” Stats row â€” */
.vida-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  flex-shrink: 0;
  padding: 0 2px;
}

.vida-stat-card {
  position: relative;
  padding: 18px 20px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.vida-stat-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  color: rgba(167, 139, 250, 0.55);
}

.vida-stat-icon svg {
  width: 100%;
  height: 100%;
}

.vida-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.vida-stat-value {
  display: block;
  font-size: 27px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.vida-stat-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 7px;
}

/* â€” Body grid â€” */
.vida-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 308px;
  gap: 16px;
  align-items: start;
  padding-bottom: 8px;
}

.vida-main,
.vida-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow: visible;
}

/* â€” Cards â€” */
.vida-card {
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px 22px;
}

.vida-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.vida-card-head h2,
.vida-card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.vida-card-head--stack {
  align-items: flex-start;
  margin-bottom: 12px;
}

.vida-quick-moment-card .vida-modal-sub {
  margin: 4px 0 0;
}

.vida-quick-moment {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(167, 139, 250, 0.35);
  background: rgba(139, 92, 246, 0.06);
}

.vida-quick-moment-photo {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 12px;
  border: 1px solid rgba(196, 181, 253, 0.35);
  background: rgba(139, 92, 246, 0.12);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vida-quick-moment-photo.has-image {
  border-color: rgba(167, 139, 250, 0.55);
}

.vida-quick-moment-photo-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 1.35rem;
  color: #c4b5fd;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.vida-quick-moment-photo-inner small {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.vida-quick-moment-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vida-quick-moment-input,
.vida-quick-moment-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  color: #f1f5f9;
  font-size: 0.86rem;
  padding: 10px 12px;
  outline: none;
  font-family: inherit;
  resize: vertical;
}

.vida-quick-moment-input:focus,
.vida-quick-moment-textarea:focus {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

.vida-quick-moment-textarea {
  min-height: 52px;
  max-height: 120px;
}

.vida-quick-moment-send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-top: 2px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vida-quick-moment-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.vida-quick-moment-foot {
  margin-top: 8px;
  min-height: 1.2rem;
}

@media (max-width: 520px) {
  .vida-quick-moment {
    flex-wrap: wrap;
  }
  .vida-quick-moment-send {
    width: 100%;
    height: 40px;
    margin-top: 0;
  }
}

.vida-highlights-card .vida-card-title,
.vida-places-card .vida-card-title,
.vida-insights-card .vida-card-title {
  margin-bottom: 16px;
}

/* â€” Filters â€” */
.vida-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.vida-filter {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.vida-filter--text {
  padding: 6px 14px;
  border-radius: 8px;
}

.vida-filter--icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.vida-filter--icon svg {
  width: 15px;
  height: 15px;
}

.vida-filter.active {
  background: rgba(139, 92, 246, 0.22);
  color: #e9d5ff;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.25);
}

.vida-filter:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

/* â€” Timeline â€” */
.vida-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.vida-timeline-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 112px;
  gap: 16px;
  align-items: start;
  padding: 16px 4px 16px 0;
  position: relative;
}

.vida-timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
  height: 100%;
  min-height: 72px;
}

.vida-timeline-rail::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.5), rgba(139, 92, 246, 0.15));
}

.vida-timeline-item--last .vida-timeline-rail::before {
  bottom: 50%;
}

.vida-timeline-node {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(109, 40, 217, 0.2));
  border: 1px solid rgba(167, 139, 250, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ddd6fe;
  flex-shrink: 0;
  margin-top: 4px;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.vida-timeline-node svg {
  width: 16px;
  height: 16px;
}

.vida-timeline-when {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.vida-timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.vida-timeline-head .vida-timeline-when {
  margin-bottom: 0;
}

.momento-delete {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  line-height: 0;
}

.momento-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.momento-delete .ti-trash {
  display: block;
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.vida-timeline-item h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 5px;
  letter-spacing: -0.01em;
}

.vida-timeline-item p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
  max-width: 460px;
}

.vida-thumb {
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vida-thumb--photo {
  width: 108px;
  min-width: 108px;
  height: 76px;
  align-self: center;
}

.vida-moment-visual-header {
  position: relative;
  overflow: hidden;
  width: 108px;
  min-width: 108px;
  height: 76px;
  align-self: center;
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1.4px 1.4px at 18% 28%, rgba(255,255,255,.85), transparent),
    radial-gradient(1px 1px at 72% 18%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.2px 1.2px at 84% 62%, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 32% 78%, rgba(255,255,255,.65), transparent),
    radial-gradient(1.3px 1.3px at 58% 42%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 8% 58%, rgba(255,255,255,.4), transparent),
    linear-gradient(165deg, #4c1d95 0%, #1e1b4b 42%, #070b22 100%);
}

.vida-moment-visual-icon {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(196, 181, 253, 0.55));
  z-index: 1;
}

.vida-day-row .vida-moment-visual-header,
.vida-day-thumb {
  width: 56px;
  min-width: 56px;
  height: 44px;
}

.vida-day-row .vida-moment-visual-icon {
  font-size: 16px;
}

.vida-moment-detail-hero .vida-moment-visual-header {
  width: 100%;
  min-width: 0;
  height: 180px;
  border-radius: 18px;
}

.vida-moment-detail-hero .vida-moment-visual-icon {
  font-size: 42px;
}

.vida-moment-detail-photo {
  width: 100%;
  height: 220px;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vida-moment-detail-title {
  margin: 16px 0 8px;
  font-size: 1.25rem;
}

.vida-moment-detail-desc {
  margin: 0 0 12px;
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.5;
}

.vida-moment-detail-meta {
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(148, 163, 184, 0.95);
  font-size: 13px;
  display: grid;
  gap: 6px;
}

.vida-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 10px;
}

.vida-link-btn {
  background: none;
  border: none;
  color: var(--purple-bright);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
}

.vida-link-btn:hover { color: #c4b5fd; }

.vida-link-btn--inline {
  font-size: 12px;
  padding: 0;
}

.vida-link-btn--block {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 14px;
  padding: 6px 0;
}

/* â€” Photos â€” */
.vida-photo-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.vida-photo-tile {
  width: 100%;
  min-width: 0;
  height: 96px;
}

.vida-photo-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 92px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px dashed rgba(139, 92, 246, 0.35);
  color: var(--purple-bright);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

.vida-photo-more small {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

/* â€” Summary â€” */
.vida-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.vida-summary-item {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.vida-summary-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.vida-summary-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.vida-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.vida-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #c084fc);
}

.vida-period-select {
  padding: 6px 28px 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: var(--text-secondary);
  font-size: 12px;
  appearance: none;
  cursor: pointer;
}

.vida-summary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.12);
}

.vida-summary-banner-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

.vida-summary-heart {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  color: rgba(167, 139, 250, 0.45);
}

.vida-summary-heart svg {
  width: 100%;
  height: 100%;
}

/* â€” Highlights â€” */
.vida-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vida-highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vida-highlight-thumb {
  width: 48px;
  min-width: 48px;
  height: 48px;
  border-radius: 8px;
}

.vida-highlight-item strong {
  display: block;
  font-size: 12.5px;
  margin-bottom: 2px;
  font-weight: 600;
  line-height: 1.3;
}

.vida-highlight-item span {
  font-size: 11px;
  color: var(--text-muted);
}

/* â€” Map & places â€” */
.vida-map-frame {
  display: block;
  position: relative;
  z-index: 0;
  width: 100%;
  height: 200px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 12px;
  box-sizing: border-box;
  margin-bottom: 14px;
  overflow: hidden;
  filter: saturate(0.9);
  background: #0d0b18;
}

.vida-globe-canvas {
  display: block;
  width: 100%;
  height: 165px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.07);
  border: 1px solid rgba(167, 139, 250, 0.12);
  box-sizing: border-box;
  margin-bottom: 14px;
}

.vida-map-svg {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 14px;
  display: block;
}

.vida-places-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vida-places-list li.vida-place-row {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 6px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

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

.vida-places-list li.vida-place-row:hover {
  background: rgba(167, 139, 250, 0.08);
  color: var(--text-primary, #f8fafc);
}

.vida-place-row--active {
  background: rgba(139, 92, 246, 0.16) !important;
  color: #e9e2ff !important;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.28);
}

.vida-sites-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vida-place-row--active .vida-sites-list {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(167, 139, 250, 0.16);
}

.vida-sites-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.vida-sites-list li:hover {
  background: rgba(167, 139, 250, 0.1);
  color: #e9e2ff;
}

.vida-site-row--active {
  background: rgba(139, 92, 246, 0.22) !important;
  color: #ede9fe !important;
}

.vida-site-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a78bfa;
  flex-shrink: 0;
}

.vida-site-name { flex: 1; }

.vida-site-visits {
  font-size: 10.5px;
  color: var(--text-muted);
}

.vida-site-row--active .vida-site-visits { color: #c4b5fd; }

.vida-place-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vida-places-list strong {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* â€” Insights â€” */
.vida-insights {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.vida-insight-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.12);
}

.vida-insight-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vida-insight-icon svg {
  width: 16px;
  height: 16px;
}

.vida-insight-icon--chart {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.vida-insight-icon--flame {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
}

.vida-insight-icon--sun {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

.vida-insight-item p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.vida-btn-insights {
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
  transition: filter 0.15s;
}

.vida-btn-insights:hover { filter: brightness(1.08); }

/* â€” Bottom nav â€” */
.vida-bottom-nav {
  display: flex;
  gap: 4px;
  padding: 8px 4px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: space-between;
}

.vida-bottom-nav::-webkit-scrollbar { display: none; }

.vida-bottom-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
  padding: 9px 4px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.vida-bottom-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

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

.vida-bottom-label {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.vida-bottom-btn.active {
  background: rgba(139, 92, 246, 0.14);
  color: var(--purple-bright);
}

.vida-bottom-btn.active .vida-bottom-icon {
  color: var(--purple-bright);
}

.vida-bottom-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

/* â€” Modal & toast â€” */
.vida-modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.vida-modal.hidden { display: none; }

.vida-modal-card {
  width: min(480px, 100%);
  padding: 22px;
  border-radius: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.vida-modal-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.vida-modal-sub {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.vida-moment-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.vida-moment-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
}

.vida-moment-type span { font-size: 20px; }
.vida-moment-type:hover { border-color: rgba(139, 92, 246, 0.4); background: rgba(139, 92, 246, 0.08); }

.vida-modal-close {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.vida-toast {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(20, 18, 35, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--text-primary);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 60;
}

.vida-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.vida-card-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vida-mf-label {
  display: block;
  margin: 12px 0 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.vida-mf-input,
.vida-mf-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
}

.vida-mf-textarea {
  min-height: 72px;
  resize: vertical;
}

.vida-mf-photo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  cursor: pointer;
}

.vida-mf-photo.hidden { display: none; }

.vida-mf-photo-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px dashed rgba(139, 92, 246, 0.45);
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

.vida-mf-photo-name {
  font-size: 11px;
  color: var(--text-muted);
}

.vida-mf-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

.vida-mf-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.vida-mf-actions .vida-btn-primary { flex: 1; }

.vida-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 55;
  padding: 16px;
}

.vida-overlay.hidden { display: none; }

.vida-overlay-card {
  width: min(560px, 100%);
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.vida-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.vida-overlay-head h3 {
  margin: 0;
  font-size: 16px;
}

.vida-overlay-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.vida-overlay-body {
  padding: 16px 18px;
  overflow-y: auto;
}

.vida-analysis-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.vida-analysis-stat {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.vida-analysis-stat strong {
  display: block;
  font-size: 20px;
  margin-bottom: 2px;
}

.vida-analysis-stat span {
  font-size: 12px;
  color: var(--text-secondary);
}

.vida-analysis-stat small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-muted);
}

.vida-analysis-insights p {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.08);
  font-size: 13px;
  color: var(--text-secondary);
}

.vida-analysis-project,
.vida-analysis-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.vida-overlay--perspective {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: #0a0a14;
}

.vida-overlay-card--perspective {
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  border-radius: 0;
  border: none;
  background: #0a0a14;
  box-shadow: none;
}

.vida-overlay--perspective .vida-overlay-body {
  padding: 0;
  overflow-y: auto;
}

.vida-perspective {
  min-height: 100%;
  padding: 12px 18px 28px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 58, 237, 0.22), transparent 60%),
    #0a0a14;
}

.vida-perspective-head {
  position: relative;
  text-align: center;
  padding: 8px 0 18px;
}

.vida-perspective-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.vida-perspective-hero-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(167, 139, 250, 0.8);
  display: grid;
  place-items: center;
  color: #c4b5fd;
  background: rgba(30, 27, 75, 0.35);
}

.vida-perspective-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.vida-perspective-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

.vida-perspective-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.vida-perspective-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 16px;
  background: #12121e;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.vida-perspective-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.18);
  flex-shrink: 0;
}

.vida-perspective-stat-copy {
  flex: 1;
  min-width: 0;
}

.vida-perspective-stat-copy strong {
  display: block;
  font-size: 20px;
  color: #fff;
  line-height: 1.1;
}

.vida-perspective-stat-copy span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
}

.vida-perspective-stat-copy small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: #64748b;
}

.vida-perspective-stat-chevron {
  color: #475569;
  font-size: 18px;
}

.vida-perspective-kicker {
  margin: 0;
  font-size: 11px;
  color: #a78bfa;
  font-weight: 500;
}

.vida-perspective-streak,
.vida-perspective-project,
.vida-perspective-ronin {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: rgba(13, 13, 21, 0.92);
  margin-bottom: 14px;
}

.vida-perspective-streak-art {
  position: absolute;
  right: 0;
  top: 0;
  width: 140px;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  pointer-events: none;
}

.vida-perspective-streak-body {
  position: relative;
  padding: 16px;
}

.vida-perspective-streak-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vida-perspective-flame {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(167, 139, 250, 0.45);
  display: grid;
  place-items: center;
  font-size: 20px;
  background: rgba(30, 27, 75, 0.35);
}

.vida-perspective-streak-value {
  margin: 4px 0 0;
  color: #c4b5fd;
  font-size: 13px;
}

.vida-perspective-streak-value strong {
  color: #fff;
  font-size: 28px;
  margin-right: 6px;
}

.vida-perspective-streak-bar {
  position: relative;
  margin-top: 18px;
  height: 24px;
}

.vida-perspective-streak-bar::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: rgba(46, 16, 101, 0.55);
  border-radius: 99px;
}

.vida-perspective-streak-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: var(--vida-streak-fill, 0%);
  height: 4px;
  transform: translateY(-50%);
  border-radius: 99px;
  background: linear-gradient(90deg, #a855f7, #7c3aed);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
}

.vida-perspective-streak-node {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(76, 29, 149, 0.65);
}

.vida-perspective-streak-node:nth-child(1) { left: 0%; }
.vida-perspective-streak-node:nth-child(2) { left: 33%; }
.vida-perspective-streak-node:nth-child(3) { left: 66%; }
.vida-perspective-streak-node:nth-child(4) { left: 100%; }

.vida-perspective-streak-node.is-start {
  width: 10px;
  height: 10px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.55);
}

.vida-perspective-streak-node.is-goal {
  width: auto;
  height: auto;
  background: transparent;
  color: #c4b5fd;
  font-size: 14px;
  transform: translate(-100%, -50%);
}

.vida-perspective-project {
  display: flex;
  min-height: 132px;
}

.vida-perspective-project-art {
  width: 130px;
  object-fit: cover;
  flex-shrink: 0;
}

.vida-perspective-project-body {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.vida-perspective-project-body h3 {
  margin: 4px 0;
  font-size: 16px;
  color: #fff;
}

.vida-perspective-project-body p {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: #94a3b8;
}

.vida-perspective-project-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: #475569;
}

.vida-perspective-outline-btn {
  border: 1px solid rgba(139, 92, 246, 0.55);
  background: transparent;
  color: #c4b5fd;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  cursor: pointer;
}

.vida-perspective-ronin {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
}

.vida-perspective-ronin-art {
  width: 88px;
  height: 88px;
  object-fit: contain;
  flex-shrink: 0;
}

.vida-perspective-ronin p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #e2e8f0;
}

.vida-perspective-ronin-sub {
  margin-top: 4px !important;
  color: #94a3b8 !important;
}

.vida-perspective-cta {
  width: 100%;
  border: none;
  border-radius: 18px;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #9333ea, #6366f1);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.28);
}

.vida-perspective-dismiss {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  padding: 8px;
  cursor: pointer;
}

.vida-album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.vida-album-item {
  aspect-ratio: 1;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.vida-album-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 8px;
  font-size: 10px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.vida-photo-strip--grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.vida-highlight-item--overlay {
  margin-bottom: 10px;
}

.vida-places-list--overlay {
  margin-top: 12px;
}

.vida-map--overlay {
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 1100px) {
  .vida-shell { overflow-y: auto; overflow-x: hidden; }
  .vida-scroll { flex: none; overflow: visible; min-height: auto; }
  .vida-bottom-nav { position: sticky; bottom: 0; z-index: 10; background: #0a0e14; margin: 0 -28px; padding-left: 12px; padding-right: 12px; }
  .vida-body { display: flex; flex-direction: column; gap: 16px; }
  .vida-main, .vida-sidebar { display: contents; }
  .vida-main > .vida-card, .vida-sidebar > .vida-card { width: 100%; box-sizing: border-box; }
  .vida-timeline-card { order: 1; }
  .vida-projects-card { order: 2; }
  .vida-photos-card { order: 3; }
  .vida-highlights-card { order: 4; }
  .vida-places-card { order: 5; }
  .vida-insights-card { order: 6; }
  .vida-summary-card { order: 7; }
  .vida-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vida-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vida-timeline-item { grid-template-columns: 36px minmax(0, 1fr) 88px; }
  .vida-thumb--photo,
  .vida-moment-visual-header { width: 88px; min-width: 88px; height: 64px; }
}

@media (max-width: 760px) {
  .vida-header { flex-direction: column; }
  .vida-body { display: flex; flex-direction: column; gap: 16px; }
  .vida-main, .vida-sidebar { display: contents; }
  .vida-timeline-card { order: 1; }
  .vida-projects-card { order: 2; }
  .vida-photos-card { order: 3; }
  .vida-highlights-card { order: 4; }
  .vida-places-card { order: 5; }
  .vida-insights-card { order: 6; }
  .vida-summary-card { order: 7; }
  .vida-bottom-nav { position: sticky; bottom: 0; z-index: 10; background: #0a0e14; margin: 0 -28px; padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 640px) {
  .vida-photo-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vida-summary-grid { grid-template-columns: 1fr; }
  .vida-timeline-item { grid-template-columns: 32px 1fr auto; }
  .vida-timeline-item .vida-thumb--photo,
  .vida-timeline-item .vida-moment-visual-header { width: 72px; height: 54px; }
  .vida-bottom-nav { justify-content: flex-start; }
  .vida-bottom-btn { flex: 0 0 auto; min-width: 56px; }
}

a.vida-btn-primary {
  text-decoration: none;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.35);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
a.vida-btn-primary:hover {
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
  color: #fff;
}
.vida-timeline-item {
  border-radius: 12px;
  transition: background 0.15s ease;
}
.vida-timeline-item:hover { background: rgba(139, 92, 246, 0.05); }
.vida-photo-tile {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.vida-photo-tile:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 22px rgba(139, 92, 246, 0.25);
}
.vida-summary-banner {
  background: linear-gradient(120deg, rgba(139, 92, 246, 0.14), rgba(76, 29, 149, 0.1));
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 14px;
}
.vida-summary-heart { color: #a78bfa; filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.6)); }
.vida-bottom-btn { transition: color 0.15s ease, background 0.15s ease; border-radius: 10px; }
.vida-bottom-btn:hover { background: rgba(139, 92, 246, 0.1); }
.vida-insight-item {
  transition: border-color 0.15s ease, background 0.15s ease;
}
.vida-insight-item:hover { background: rgba(139, 92, 246, 0.08); }
.vida-map-frame { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }

/* — Vida polish pass 2: profundidad y jerarquía — */
.vida-shell {
  background:
    radial-gradient(ellipse 60% 40% at 15% -10%, rgba(139, 92, 246, 0.09), transparent 60%),
    radial-gradient(ellipse 50% 35% at 95% 5%, rgba(76, 29, 149, 0.07), transparent 60%);
}
.vida-title {
  background: linear-gradient(90deg, #f8fafc, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.vida-stat-card {
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.07), rgba(255, 255, 255, 0.015) 55%);
}
.vida-stat-value {
  background: linear-gradient(90deg, #f8fafc, #ddd6fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.vida-stat-icon {
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.25);
}
.vida-card-head h2, .vida-card-title {
  font-size: 15px;
  letter-spacing: -0.01em;
}
.vida-filter {
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.vida-filter:hover { box-shadow: 0 0 10px rgba(139, 92, 246, 0.3); }
.vida-timeline { position: relative; }
.vida-timeline::before {
  background: linear-gradient(to bottom, #8b5cf6, rgba(139, 92, 246, 0.35), rgba(139, 92, 246, 0.05)) !important;
}
.vida-timeline-item strong { letter-spacing: -0.01em; }
.vida-link-btn--block {
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 10px;
  padding: 10px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.vida-link-btn--block:hover {
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.2);
}
.vida-summary-item {
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.06), rgba(255, 255, 255, 0.01));
  transition: border-color 0.15s ease;
}
.vida-summary-item:hover { border-color: rgba(167, 139, 250, 0.35); }
.vida-bar > span {
  background: linear-gradient(90deg, #7c3aed, #a78bfa) !important;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}
.vida-bottom-nav {
  border-top: 1px solid rgba(167, 139, 250, 0.12);
  background: linear-gradient(to top, rgba(139, 92, 246, 0.05), transparent);
}
.vida-scroll::-webkit-scrollbar { width: 8px; }
.vida-scroll::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.25); border-radius: 4px; }
.vida-scroll::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.45); }
.vida-scroll::-webkit-scrollbar-track { background: transparent; }

/* — Vistas de tabs inferiores — */
.vida-view { max-width: 1080px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.vida-view-tag {
  font-size: 12px; color: #c4b5fd; font-weight: 600; white-space: nowrap;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(167, 139, 250, 0.25);
}
.vida-day-list { display: flex; flex-direction: column; }
.vida-day-row {
  display: grid; grid-template-columns: 52px 20px minmax(0, 1fr) 96px;
  gap: 14px; align-items: center; padding: 14px 4px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.vida-day-row:last-child { border-bottom: none; }
.vida-day-hour { font-size: 12px; font-weight: 700; color: #a78bfa; }
.vida-day-dot {
  width: 10px; height: 10px; border-radius: 50%; justify-self: center;
  background: #8b5cf6; box-shadow: 0 0 10px rgba(139, 92, 246, 0.7);
}
.vida-day-body strong { display: block; font-size: 13.5px; margin-bottom: 3px; }
.vida-day-body p { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.vida-day-thumb { width: 96px; height: 60px; border-radius: 10px; }
.vida-week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.vida-week-col {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border-radius: 14px; min-height: 150px;
  background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(148, 163, 184, 0.1);
}
.vida-week-col--today {
  background: rgba(139, 92, 246, 0.12); border-color: #8b5cf6;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.25);
}
.vida-week-day { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.vida-week-num { font-size: 20px; font-weight: 700; }
.vida-week-count { font-size: 10.5px; color: #a78bfa; font-weight: 600; }
.vida-week-items { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; width: 100%; }
.vida-week-item {
  font-size: 10.5px; text-align: center; color: var(--text-secondary);
  padding: 4px 6px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(167, 139, 250, 0.15);
}
.vida-month-head {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px;
  margin-bottom: 8px; text-align: center;
  font-size: 11px; color: var(--text-muted); font-weight: 700; letter-spacing: 0.05em;
}
.vida-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.vida-month-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  aspect-ratio: 1.5; border-radius: 10px;
  background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(148, 163, 184, 0.08);
}
.vida-month-cell--empty { background: transparent; border-color: transparent; }
.vida-month-cell--future { opacity: 0.4; }
.vida-month-cell--today {
  background: rgba(139, 92, 246, 0.16); border-color: #8b5cf6;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.3);
}
.vida-month-num { font-size: 12.5px; font-weight: 600; }
.vida-month-dots { display: flex; gap: 3px; min-height: 5px; }
.vida-month-dot { width: 5px; height: 5px; border-radius: 50%; background: #a78bfa; }
.vida-year-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.vida-year-cell {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(148, 163, 184, 0.1);
}
.vida-year-cell--now { border-color: #8b5cf6; background: rgba(139, 92, 246, 0.12); }
.vida-year-cell--future { opacity: 0.45; }
.vida-year-name { font-size: 12px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.vida-year-count { font-size: 22px; font-weight: 700; }
.vida-map-frame--big { height: 380px; margin-bottom: 18px; }
.vida-album-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.vida-album-tile {
  position: relative; height: 130px; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08); cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.vida-album-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(139, 92, 246, 0.28); }
.vida-album-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 12px 10px;
  font-size: 12px; font-weight: 700; color: #f5f3ff;
  background: linear-gradient(to top, rgba(8, 6, 18, 0.85), transparent);
}
.vida-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
@media (max-width: 900px) {
  .vida-week-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .vida-year-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vida-album-grid, .vida-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .vida-week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vida-year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vida-day-row { grid-template-columns: 44px 14px minmax(0, 1fr); }
  .vida-day-thumb { display: none; }
}

/* — Vistas: pase bonito — */
.vida-view { animation: vida-view-in 0.3s ease; }
@keyframes vida-view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.vida-day-list { position: relative; }
.vida-day-list::before {
  content: ''; position: absolute; left: 70px; top: 12px; bottom: 12px; width: 2px;
  background: linear-gradient(to bottom, #8b5cf6, rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0.05));
}
.vida-day-row { position: relative; border-radius: 12px; transition: background 0.15s ease; }
.vida-day-row:hover { background: rgba(139, 92, 246, 0.06); }
.vida-day-dot { position: relative; z-index: 1; border: 2px solid #0a0e14; width: 12px; height: 12px; }
.vida-day-hour {
  text-align: right; padding-right: 4px;
  background: linear-gradient(90deg, #c4b5fd, #a78bfa);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.vida-day-thumb { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); transition: transform 0.18s ease; }
.vida-day-row:hover .vida-day-thumb { transform: scale(1.04); }
.vida-week-col { transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; cursor: pointer; }
.vida-week-col:hover { transform: translateY(-3px); border-color: rgba(167, 139, 250, 0.4); box-shadow: 0 10px 22px rgba(139, 92, 246, 0.2); }
.vida-week-col--today {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.22), rgba(76, 29, 149, 0.12));
}
.vida-week-col--today .vida-week-num {
  background: linear-gradient(90deg, #f5f3ff, #c4b5fd);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.vida-month-cell { transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease; cursor: pointer; }
.vida-month-cell:hover { transform: scale(1.05); border-color: rgba(167, 139, 250, 0.45); background: rgba(139, 92, 246, 0.1); }
.vida-month-cell--empty:hover { transform: none; border-color: transparent; background: transparent; }
.vida-month-cell--today {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.28), rgba(76, 29, 149, 0.16));
}
.vida-month-cell--today .vida-month-num { color: #ede9fe; font-weight: 800; }
.vida-month-dot { box-shadow: 0 0 6px rgba(167, 139, 250, 0.8); }
.vida-year-cell { transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; cursor: pointer; }
.vida-year-cell:hover { transform: translateY(-3px); border-color: rgba(167, 139, 250, 0.4); box-shadow: 0 10px 22px rgba(139, 92, 246, 0.2); }
.vida-year-cell--now {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.2), rgba(76, 29, 149, 0.1));
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.22);
}
.vida-year-count {
  background: linear-gradient(90deg, #f8fafc, #ddd6fe);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.vida-album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vida-album-tile { height: 150px; }
.vida-album-tile::after {
  content: ''; position: absolute; inset: 0; border-radius: 12px;
  border: 1px solid transparent; transition: border-color 0.18s ease;
  pointer-events: none;
}
.vida-album-tile:hover::after { border-color: rgba(167, 139, 250, 0.55); }
.vida-album-label { font-size: 13px; letter-spacing: -0.01em; }
.vida-stats-grid .vida-summary-value { font-size: 24px; }

/* — Calendario: selector de periodo — */
.vida-cal-pills {
  display: flex; gap: 8px; justify-content: center;
  max-width: 1080px; margin: 0 auto 14px; width: 100%;
}
.vida-cal-pill {
  padding: 9px 26px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--text-secondary); font-size: 13px; font-weight: 600; font-family: inherit;
  transition: all 0.15s ease;
}
.vida-cal-pill:hover { border-color: rgba(167, 139, 250, 0.45); color: #e2e8f0; }
.vida-cal-pill--on {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9); border-color: #8b5cf6;
  color: #fff; box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}
.vida-bottom-btn { flex: 1; max-width: 150px; }
.vida-bottom-nav { justify-content: center; }

/* — Álbum: editar / crear / detalle — */
.vida-album-count { display: block; font-size: 10px; font-weight: 500; color: #c4b5fd; margin-top: 2px; }
.vida-album-new {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  height: 150px; border-radius: 12px; cursor: pointer;
  border: 1px dashed rgba(167, 139, 250, 0.45); background: rgba(139, 92, 246, 0.05);
  color: #a78bfa; font-family: inherit; font-size: 13px; font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.vida-album-new:hover { background: rgba(139, 92, 246, 0.12); border-color: #8b5cf6; }
.vida-album-new-plus {
  width: 36px; height: 36px; border-radius: 50%; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(139, 92, 246, 0.15); border: 1px solid rgba(167, 139, 250, 0.35);
}
.vida-album-detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.vida-album-name-input {
  flex: 1; min-width: 180px; padding: 10px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(167, 139, 250, 0.25);
  color: #f8fafc; font-size: 16px; font-weight: 700; font-family: inherit; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vida-album-name-input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18); }
.vida-album-del { font-size: 12px; padding: 9px 14px; }
.vida-album-del:hover { border-color: rgba(244, 63, 94, 0.5); color: #fda4af; }
.vida-album-hint { font-size: 12px; color: var(--text-muted); margin: 0 0 14px; }
.vida-album-foto--cover { box-shadow: 0 0 0 2px #8b5cf6, 0 8px 20px rgba(139, 92, 246, 0.35); }
.vida-album-cover-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  background: rgba(139, 92, 246, 0.9); color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.vida-album-add { height: 150px; }

/* — Álbum: acciones de foto + lightbox — */
.vida-foto-actions {
  position: absolute; bottom: 8px; right: 8px; display: flex; gap: 6px;
  opacity: 0; transition: opacity 0.15s ease;
}
.vida-album-foto:hover .vida-foto-actions { opacity: 1; }
.vida-foto-btn {
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 12, 28, 0.78); border: 1px solid rgba(167, 139, 250, 0.35);
  color: #e2e8f0; font-size: 14px; font-family: inherit; backdrop-filter: blur(6px);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.vida-foto-btn:hover { background: rgba(139, 92, 246, 0.85); border-color: #8b5cf6; color: #fff; transform: translateY(-1px); }
.vida-lightbox {
  position: fixed; inset: 0; z-index: 2000; cursor: zoom-out;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 6, 18, 0.88); backdrop-filter: blur(10px);
  animation: vidaLbFade 0.18s ease;
}
@keyframes vidaLbFade { from { opacity: 0; } to { opacity: 1; } }
.vida-lightbox-img {
  width: 82vw; height: 80vh; cursor: default;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  border-radius: 14px;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.65));
  animation: vidaLbPop 0.22s ease;
}
@keyframes vidaLbPop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.vida-lightbox-actions { position: absolute; top: 22px; right: 26px; display: flex; gap: 10px; }
.vida-lightbox-btn { width: auto; height: 38px; padding: 0 16px; font-size: 13px; font-weight: 600; border-radius: 10px; gap: 6px; }

/* — Bottom nav: más visible — */
.vida-bottom-nav {
  gap: 10px; padding: 12px 10px 14px;
  border-top: 1px solid rgba(167, 139, 250, 0.22);
  background: linear-gradient(to top, rgba(139, 92, 246, 0.10), rgba(139, 92, 246, 0.02)), #0a0e14;
}
.vida-bottom-btn { padding: 11px 6px; color: var(--text-secondary); }
.vida-bottom-icon { width: 24px; height: 24px; }
.vida-bottom-icon svg { width: 22px; height: 22px; }
.vida-bottom-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em; }
.vida-bottom-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(109, 40, 217, 0.22));
  color: #fff;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35), inset 0 0 0 1px rgba(167, 139, 250, 0.4);
}
.vida-bottom-btn.active .vida-bottom-icon { color: #c4b5fd; filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.7)); }
.vida-bottom-btn:hover:not(.active) { background: rgba(139, 92, 246, 0.12); color: #e2e8f0; }

.vida-bottom-btn:hover:not(.active) { background: rgba(139, 92, 246, 0.12); color: #e2e8f0; }

/* — Highlights (tarjetas con foto) — */
.vida-hl-card {
  position: relative;
  height: 118px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(167, 139, 250, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.vida-hl-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.28);
}
.vida-hl-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}
.vida-hl-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(8, 6, 18, 0.94) 0%, rgba(8, 6, 18, 0.35) 72%, transparent 100%);
}
.vida-hl-overlay strong { display: block; font-size: 13px; color: #f8fafc; margin-bottom: 2px; font-weight: 600; }
.vida-hl-overlay span { font-size: 11px; color: #c4b5fd; }

#vida-alt-views {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 6px;
}

.vida-highlights--overlay {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* PWA: Vida a pantalla completa (como Inversión) */
#app.vida-mode {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #0a0e14 !important;
}
#app.vida-mode .topbar,
#app.vida-mode .ronin-voice-float {
  display: none !important;
}
.main.vida-active {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 0;
  flex: 1;
  background: #0a0e14 !important;
}
.vida-screen.screen-shell {
  flex: 1;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vida-screen .vida-shell {
  flex: 1;
  min-height: 0;
  height: auto;
  padding: 12px 16px 0;
  gap: 14px;
}
.vida-screen .vida-bottom-nav {
  flex-shrink: 0;
  margin: 0 -16px;
  padding: 12px 8px calc(14px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 720px) {
  .vida-screen .vida-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .vida-screen .vida-header-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
  .vida-screen .vida-btn-primary,
  .vida-screen .vida-btn-outline { flex: 1; min-width: 140px; justify-content: center; }
  .vida-screen .vida-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vida-screen .vida-body { grid-template-columns: 1fr; }
  .vida-screen .vida-week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vida-screen .vida-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vida-screen .vida-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vida-screen .vida-day-row { grid-template-columns: 44px 16px minmax(0, 1fr); }
  .vida-screen .vida-day-thumb { display: none; }
  .vida-screen .vida-bottom-btn { min-width: 0; flex: 1; max-width: none; padding: 10px 4px; }
  .vida-screen .vida-bottom-label { font-size: 10px; }
  .vida-screen .vida-cal-pill { padding: 8px 16px; font-size: 12px; }
  .vida-screen .vida-map-frame--big { height: 260px; }
  .vida-screen .vida-album-detail-head { flex-wrap: wrap; }
  .vida-screen .vida-album-name-input { min-width: 100%; order: 3; }
}

/* — Filtros de línea de tiempo: píldoras con texto — */
.vida-filter--pill {
  display: inline-flex; align-items: center; gap: 6px;
  width: auto; height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; font-family: inherit;
}
.vida-filter--pill .vida-filter-ic { display: flex; align-items: center; }
.vida-filter--pill .vida-filter-ic:empty { display: none; }
.vida-filter--pill .vida-filter-ic svg { width: 14px; height: 14px; }
.vida-filter-txt { white-space: nowrap; }

/* — Fotos recientes: cuadrícula sin separación — */
.vida-photo-strip { gap: 0; border-radius: 10px; overflow: hidden; }
.vida-photo-tile, .vida-photo-more { height: 96px; border-radius: 0; }
.vida-photo-tile:hover { transform: none; box-shadow: inset 0 0 0 2px rgba(167, 139, 250, 0.7); z-index: 1; }

/* ===== Nuevo proyecto de vida ===== */
.vnp-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; background: #0a0a12; }
.vnp-header { display: flex; align-items: flex-start; gap: 14px; padding: 8px 6px 16px; flex-shrink: 0; border-bottom: 1px solid var(--border); }
.vnp-back { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,.03); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 4px; }
.vnp-back svg { width: 18px; height: 18px; }
.vnp-header-text { flex: 1; min-width: 0; }
.vnp-header-text h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.vnp-header-text p { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.45; }
.vnp-templates-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(139,92,246,.35); background: rgba(139,92,246,.08); color: var(--purple-bright); font-size: 12px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.vnp-templates-btn svg { width: 16px; height: 16px; }
.vnp-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; padding: 16px 6px; scrollbar-width: none; }
.vnp-body::-webkit-scrollbar { display: none; }
.vnp-main { display: flex; flex-direction: column; gap: 14px; }
.vnp-section { background: rgba(16,18,28,.9); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.vnp-section-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.vnp-section-head h2 { font-size: 16px; font-weight: 600; }
.vnp-section-head p { font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
.vnp-num { width: 28px; height: 28px; border-radius: 50%; background: var(--purple); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vnp-basic-grid { display: grid; grid-template-columns: 1fr 200px; gap: 16px; }
.vnp-label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.vnp-input, .vnp-textarea, .vnp-select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-light); background: rgba(255,255,255,.03); color: var(--text-primary); font-size: 13px; margin-bottom: 12px; }
.vnp-textarea { min-height: 100px; resize: vertical; }
.vnp-char-count { display: block; text-align: right; font-size: 11px; color: var(--text-muted); margin-top: -8px; }
.vnp-hero-visual { position: relative; }
.vnp-hero-img { width: 100%; height: 160px; border-radius: 50%; background-size: cover; background-position: center; border: 3px solid rgba(139,92,246,.25); }
.vnp-hero-badge { position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; border-radius: 50%; background: var(--purple); border: 2px solid #1a1030; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 0 16px rgba(139,92,246,.5); }
.vnp-hero-badge svg { width: 16px; height: 16px; }
.vnp-areas-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.vnp-area-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.02); color: var(--text-secondary); font-size: 11px; text-align: center; min-height: 88px; transition: all .15s; }
.vnp-area-card.selected { border-color: rgba(139,92,246,.5); background: rgba(139,92,246,.12); color: var(--purple-bright); }
.vnp-area-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(139,92,246,.12); display: flex; align-items: center; justify-content: center; color: var(--purple-bright); }
.vnp-area-icon svg { width: 18px; height: 18px; }
.vnp-hint { font-size: 11px; color: var(--text-muted); margin-top: 10px; }
.vnp-objective-row { display: grid; grid-template-columns: 28px 1fr 130px; gap: 8px; align-items: center; margin-bottom: 8px; }
.vnp-objective-icon { color: var(--purple-bright); display: flex; }
.vnp-objective-icon svg { width: 18px; height: 18px; }
.vnp-objective-input { margin-bottom: 0; }
.vnp-add-obj { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 12px; border-radius: 8px; border: 1px dashed rgba(139,92,246,.4); color: var(--purple-bright); font-size: 12px; background: transparent; }
.vnp-values { display: flex; flex-wrap: wrap; gap: 8px; }
.vnp-value-pill { padding: 8px 14px; border-radius: 20px; border: 1px solid var(--border); background: rgba(255,255,255,.03); color: var(--text-secondary); font-size: 12px; }
.vnp-value-pill.selected { border-color: rgba(139,92,246,.45); background: rgba(139,92,246,.15); color: var(--purple-bright); }
.vnp-custom-value { display: flex; gap: 8px; margin-top: 12px; }
.vnp-custom-value .vnp-input { margin-bottom: 0; flex: 1; }
.vnp-value-add { width: 40px; border-radius: 10px; border: 1px solid var(--border); background: rgba(139,92,246,.12); color: var(--purple-bright); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vnp-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.vnp-photo-slot { width: 100px; height: 100px; border-radius: 12px; border: 1px dashed var(--border-light); overflow: hidden; position: relative; }
.vnp-photo-upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-muted); font-size: 10px; text-align: center; padding: 8px; cursor: pointer; }
.vnp-photo-upload svg { width: 20px; height: 20px; color: var(--purple-bright); }
.vnp-photo-filled img { width: 100%; height: 100%; object-fit: cover; }
.vnp-photo-remove { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; border: none; font-size: 14px; line-height: 1; }
.vnp-sidebar { display: flex; flex-direction: column; gap: 12px; }
.vnp-card { background: rgba(16,18,28,.9); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.vnp-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.vnp-summary-hero { height: 80px; border-radius: 10px; background-size: cover; background-position: center; margin-bottom: 12px; }
.vnp-summary-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.vnp-summary-list li { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.vnp-summary-list span { color: var(--text-muted); }
.vnp-summary-list strong { color: var(--text-primary); font-weight: 600; }
.vnp-dot { color: var(--purple-bright) !important; }
.vnp-dot::before { content: 'â— '; font-size: 10px; }
.vnp-ronin-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.vnp-ronin-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.vnp-ronin-list svg { width: 16px; height: 16px; color: var(--purple-bright); flex-shrink: 0; margin-top: 1px; }
.vnp-examples { display: flex; flex-direction: column; gap: 8px; }
.vnp-example-card { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; border: 1px solid transparent; background: rgba(255,255,255,.02); text-align: left; color: inherit; }
.vnp-example-card:hover { border-color: var(--border); }
.vnp-example-thumb { width: 44px; height: 44px; border-radius: 8px; background-size: cover; background-position: center; flex-shrink: 0; }
.vnp-example-card strong { display: block; font-size: 12px; }
.vnp-example-card p { font-size: 10px; color: var(--text-muted); margin-top: 2px; line-height: 1.3; }
.vnp-link { font-size: 12px; color: var(--purple-bright); margin-top: 10px; background: none; border: none; }
.vnp-footer { display: flex; justify-content: space-between; align-items: center; padding: 14px 6px; border-top: 1px solid var(--border); flex-shrink: 0; }
.vnp-btn-cancel { padding: 12px 20px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,.03); color: var(--text-secondary); font-size: 13px; }
.vnp-btn-create { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; background: linear-gradient(135deg, #7c3aed, #6d28d9); color: #fff; font-size: 13px; font-weight: 600; border: none; box-shadow: 0 4px 20px rgba(124,58,237,.35); }
.vnp-btn-create svg { width: 16px; height: 16px; }
.vnp-templates-modal { position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 6000; padding: 24px; }
.vnp-templates-modal.hidden { display: none !important; }
.vnp-templates-card { background: #12151f; border: 1px solid var(--border-light); border-radius: 14px; padding: 20px; max-width: 520px; width: 100%; }
.vnp-templates-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.vnp-template-card { padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.03); text-align: left; color: inherit; }
.vnp-template-emoji { font-size: 24px; display: block; margin-bottom: 6px; }
.vnp-template-card strong { font-size: 13px; display: block; }
.vnp-template-card p { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.35; }
.vnp-modal-close { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-size: 12px; }
.app-body.vida-mode .main-panel:has(#vida-create-view:not(.hidden)) { padding: 0 12px; }
@media (max-width: 1100px) {
  .vnp-body { grid-template-columns: 1fr; }
  .vnp-sidebar { order: -1; }
  .vnp-areas-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vnp-basic-grid { grid-template-columns: 1fr; }
  .vnp-hero-visual { display: none; }
}
@media (max-width: 640px) {
  .vnp-areas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vnp-objective-row { grid-template-columns: 24px 1fr; }
  .vnp-objective-term { grid-column: 2; }
  .vnp-header { flex-wrap: wrap; }
  .vnp-templates-btn { width: 100%; justify-content: center; }
}

/* ===== Pantalla Sistema ===== */
.sys-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 20px 24px 16px;
  gap: 14px;
}
.sys-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.sys-header-left { display: flex; gap: 14px; align-items: flex-start; }
.sys-header-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(96,165,250,.2), rgba(59,130,246,.08));
  border: 1px solid rgba(96,165,250,.25);
  display: flex; align-items: center; justify-content: center;
}
.sys-header-icon svg { width: 22px; height: 22px; color: #60a5fa; }
.sys-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.sys-subtitle { font-size: 13px; color: var(--text-muted); margin: 0; max-width: 520px; }
.sys-header-actions { display: flex; align-items: center; gap: 12px; }
.sys-scan-label { font-size: 12px; color: var(--text-muted); }
.sys-btn-primary {
  padding: 10px 16px; border-radius: 10px; border: none;
  background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; font-size: 13px; font-weight: 600;
}
.sys-tabs {
  display: flex; gap: 8px; overflow-x: auto; flex-shrink: 0;
  padding-bottom: 4px;
}
.sys-tabs::-webkit-scrollbar { display: none; }
.sys-tab {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(255,255,255,.02); color: var(--text-secondary); font-size: 12px; white-space: nowrap;
}
.sys-tab.active { background: rgba(59,130,246,.15); border-color: rgba(59,130,246,.4); color: #93c5fd; }
.sys-body { flex: 1; min-height: 0; overflow: auto; }
.sys-card {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px;
}
.sys-card h3 { margin: 0 0 14px; font-size: 15px; }
.sys-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.sys-card-head h3 { margin: 0; }
.sys-subtitle { font-size: 13px; font-weight: 600; margin: 16px 0 8px; color: var(--text-secondary); }
.sys-kv-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.sys-kv-grid > div {
  padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.02); border: 1px solid var(--border);
}
.sys-kv-grid span { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.sys-kv-grid strong { font-size: 13px; font-weight: 600; }
.sys-table-wrap { overflow: auto; max-height: 52vh; }
.sys-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sys-table th, .sys-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.sys-table th { color: var(--text-muted); font-weight: 600; position: sticky; top: 0; background: var(--bg-secondary); }
.sys-hw-block { padding: 10px 0; border-bottom: 1px solid var(--border); }
.sys-hw-block strong { display: block; margin-bottom: 4px; }
.sys-hw-block span { font-size: 12px; color: var(--text-muted); }
.sys-disk-row { margin-bottom: 14px; }
.sys-disk-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.sys-disk-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; margin-bottom: 4px; }
.sys-disk-bar span { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa); border-radius: inherit; }
.sys-disk-row small { font-size: 11px; color: var(--text-muted); }
.sys-opt-list { display: flex; flex-direction: column; gap: 10px; }
.sys-opt-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.02);
}
.sys-opt-card strong { display: block; font-size: 13px; }
.sys-opt-card span { font-size: 12px; color: var(--text-muted); }
.sys-btn-outline, .sys-btn-primary-sm {
  padding: 8px 12px; border-radius: 8px; font-size: 12px; border: 1px solid var(--border);
  background: rgba(255,255,255,.03); color: var(--text-secondary); white-space: nowrap;
}
.sys-btn-primary-sm { background: rgba(59,130,246,.2); border-color: rgba(59,130,246,.35); color: #93c5fd; }
.sys-empty { color: var(--text-muted); font-size: 13px; padding: 24px 0; text-align: center; }
.sys-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(12px);
  padding: 10px 18px; border-radius: 10px; background: #1e293b; border: 1px solid var(--border);
  font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 9000;
}
.sys-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Rendimiento â€” paneles de mÃ©trica */
.perf-metric-detail { padding: 20px 22px; }
.perf-metric-detail h3 { margin: 0 0 16px; font-size: 16px; }
.perf-detail-score {
  font-size: 42px; font-weight: 700; line-height: 1; margin-bottom: 18px;
}
.perf-detail-score span { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-top: 6px; }
.perf-detail-list { list-style: none; margin: 0 0 16px; padding: 0; }
.perf-detail-list li {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.perf-detail-list span { color: var(--text-muted); }
.perf-detail-block { margin-bottom: 16px; }
.perf-detail-note { font-size: 12px; color: var(--text-muted); margin: 0; }
.perf-auto-desc { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; }
.perf-auto-block { margin-bottom: 18px; }



/* ==== Proyecto de vida (creador) ==== */
.pv-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(167, 139, 250, 0.25);
  color: #c4b5fd !important; transition: background 0.15s ease;
}
.pv-back:hover { background: rgba(139, 92, 246, 0.28); }
.pv-sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.pv-sec-head h2 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.pv-sec-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, #7c3aed, #8b5cf6); color: #fff; flex-shrink: 0;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.45);
}
.pv-sec-sub { font-size: 12.5px; color: var(--text-muted); margin: 0 0 16px 38px; }
.pv-hint { font-size: 11.5px; color: var(--text-muted); text-align: center; margin: 14px 0 0; }
.pv-basic { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 20px; margin-left: 38px; }
.pv-basic-form { display: flex; flex-direction: column; }
.pv-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin: 12px 0 6px; }
.pv-label:first-child { margin-top: 0; }
.pv-input {
  width: 100%; box-sizing: border-box; padding: 11px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(167, 139, 250, 0.22);
  color: #f8fafc; font-size: 13px; font-family: inherit; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pv-input::placeholder { color: rgba(148, 163, 184, 0.55); }
.pv-input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18); }
.pv-textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.pv-counter { align-self: flex-end; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.pv-basic-art { display: flex; align-items: center; justify-content: center; }
.pv-art-orb {
  position: relative; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle at 50% 68%, #f5b04c 0%, #d3548a 26%, #7c3aed 58%, #2e1065 100%);
  border: 1px solid rgba(196, 181, 253, 0.4);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.35), inset 0 0 30px rgba(46, 16, 101, 0.5);
}
.pv-art-sun {
  position: absolute; left: 50%; top: 62%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle, #fde68a, #f59e0b 70%);
  box-shadow: 0 0 24px rgba(253, 230, 138, 0.8);
}
.pv-art-heart {
  position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 20px; background: #1b1533; border: 2px solid #8b5cf6;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.5);
}
.pv-areas-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-left: 38px; }
.pv-area-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 8px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--text-secondary); font-family: inherit; font-size: 12px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.pv-area-tile:hover { border-color: rgba(167, 139, 250, 0.4); transform: translateY(-2px); }
.pv-area-tile--on {
  border-color: #8b5cf6; background: rgba(139, 92, 246, 0.14); color: #ede9fe;
  box-shadow: 0 0 0 1px #8b5cf6, 0 6px 18px rgba(139, 92, 246, 0.25);
}
.pv-area-tile-icon {
  font-size: 24px; line-height: 1; width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(167, 139, 250, 0.14);
}
.pv-area-tile--on .pv-area-tile-icon { background: rgba(139, 92, 246, 0.25); border-color: rgba(196, 181, 253, 0.5); }
.pv-area-tile-name { font-weight: 600; text-align: center; }
.pv-goals-list { display: flex; flex-direction: column; gap: 12px; margin-left: 38px; }
.pv-goal-row { display: flex; align-items: center; gap: 10px; }
.pv-goal-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: rgba(139, 92, 246, 0.12); color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.2);
}
.pv-goal-input { flex: 1; }
.pv-select {
  padding: 11px 12px; border-radius: 10px; min-width: 140px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(167, 139, 250, 0.22);
  color: #e2e8f0; font-size: 12.5px; font-family: inherit; outline: none; cursor: pointer;
}
.pv-select:focus { border-color: #8b5cf6; }
.pv-select option { background: #14101f; }
.pv-add-btn {
  display: block; width: calc(100% - 38px); margin: 14px 0 0 38px; padding: 12px;
  border-radius: 10px; border: 1px dashed rgba(167, 139, 250, 0.4);
  background: transparent; color: #a78bfa; font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: background 0.15s ease;
}
.pv-add-btn:hover { background: rgba(139, 92, 246, 0.08); }
.pv-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-left: 38px; }
.pv-chip {
  padding: 9px 20px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text-secondary); font-size: 12.5px; font-weight: 600; font-family: inherit;
  transition: all 0.15s ease;
}
.pv-chip:hover { border-color: rgba(167, 139, 250, 0.45); color: #e2e8f0; }
.pv-chip--on { background: rgba(139, 92, 246, 0.18); border-color: #8b5cf6; color: #ede9fe; }
.pv-custom-row { display: flex; gap: 10px; margin: 14px 0 0 38px; }
.pv-custom-input { flex: 1; }
.pv-plus-btn {
  width: 42px; border-radius: 10px; flex-shrink: 0; cursor: pointer;
  background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(167, 139, 250, 0.3);
  color: #c4b5fd; font-size: 18px; font-family: inherit; transition: background 0.15s ease;
}
.pv-plus-btn:hover { background: rgba(139, 92, 246, 0.3); }
.pv-photos-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-left: 38px; }
.pv-photo-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  height: 104px; border-radius: 12px; cursor: pointer;
  border: 1px dashed rgba(167, 139, 250, 0.45); background: rgba(139, 92, 246, 0.06);
  color: #a78bfa; font-family: inherit; font-size: 12px; font-weight: 600;
  transition: background 0.15s ease;
}
.pv-photo-add:hover { background: rgba(139, 92, 246, 0.14); }
.pv-photo-add small { font-size: 9.5px; font-weight: 400; color: var(--text-muted); }
.pv-photo-tile {
  position: relative; height: 104px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}
.pv-photo-tile:hover { transform: translateY(-2px); }
.pv-photo-x {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: rgba(10, 8, 20, 0.75); border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0; font-size: 14px; line-height: 1; font-family: inherit;
}
.pv-photo-x:hover { background: rgba(190, 24, 93, 0.7); }
.pv-footer {
  display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  padding: 18px 22px; margin: 16px 0 24px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.022); border: 1px solid rgba(148, 163, 184, 0.1);
}
.pv-cancel { padding: 12px 24px; }
.pv-cancel { text-decoration: none; }
.pv-create {
  font-size: 14px; padding: 13px 26px; border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.4);
}
.pv-create:hover { box-shadow: 0 10px 28px rgba(139, 92, 246, 0.55); }
.pv-summary-art {
  position: relative; height: 140px; border-radius: 14px; margin-bottom: 16px; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center; font-size: 52px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(196, 181, 253, 0.35), transparent 65%),
    linear-gradient(160deg, #8b5cf6 0%, #6d28d9 45%, #3b0f7e 100%);
  box-shadow: inset 0 0 40px rgba(30, 10, 70, 0.5);
}
.pv-summary-mountain { transform: translateY(6px); filter: drop-shadow(0 6px 14px rgba(20, 6, 50, 0.6)); }
.pv-summary-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pv-summary-list li {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(148, 163, 184, 0.08);
}
.pv-summary-list li > div { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pv-sum-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; font-size: 15px; flex-shrink: 0;
  background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(167, 139, 250, 0.22);
}
.pv-summary-list small { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.pv-summary-list strong {
  font-size: 13px; font-weight: 700; color: #ede9fe; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%;
}
.pv-estado { color: #a78bfa; font-size: 12.5px; }
.pv-ronin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pv-ronin-list li {
  position: relative; padding: 4px 0 4px 32px; font-size: 12.5px;
  color: var(--text-secondary); line-height: 1.5;
}
.pv-example-row {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(148, 163, 184, 0.08);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pv-example-row:hover { background: rgba(139, 92, 246, 0.08); border-color: rgba(167, 139, 250, 0.3); }
.pv-example-thumb {
  width: 46px; height: 46px; min-width: 46px; border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.pv-example-row strong { display: block; font-size: 12.5px; font-weight: 700; color: #ede9fe; margin-bottom: 2px; }
.pv-example-row small { display: block; font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.pv-examples { display: flex; flex-direction: column; gap: 8px; }
.pv-ronin-list li::before {
  content: 'âœ“'; position: absolute; left: 0; top: 4px;
  width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  background: rgba(139, 92, 246, 0.18); color: #c4b5fd; border: 1px solid rgba(167, 139, 250, 0.4);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.25);
}
@media (max-width: 1100px) {
  .pv-areas-grid, .pv-photos-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pv-basic { grid-template-columns: 1fr; }
  .pv-basic-art { order: -1; }
}
@media (max-width: 640px) {
  .pv-basic, .pv-areas-grid, .pv-goals-list, .pv-chips, .pv-custom-row, .pv-photos-row { margin-left: 0; }
  .pv-add-btn { width: 100%; margin-left: 0; }
  .pv-sec-sub { margin-left: 0; }
  .pv-areas-grid, .pv-photos-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-goal-row { flex-wrap: wrap; }
  .pv-select { flex: 1; }
}

.pv-examples { margin-top: 4px; }
.vida-sidebar .vida-card .vida-card-title { margin-bottom: 16px; }

.pv-art-orb { cursor: pointer; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.pv-art-orb:hover { box-shadow: 0 0 55px rgba(139, 92, 246, 0.55), inset 0 0 30px rgba(46, 16, 101, 0.5); transform: scale(1.02); }
.pv-art-orb--photo { background: #1b1533 !important; background-size: cover !important; background-position: center !important; }
.pv-orb-cta {
  position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%);
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  background: rgba(10, 8, 20, 0.62); border: 1px solid rgba(196, 181, 253, 0.4);
  color: #ede9fe; font-size: 11.5px; font-weight: 600; backdrop-filter: blur(4px);
  opacity: 0.95; pointer-events: none; transition: opacity 0.2s ease;
}
.pv-art-orb--photo .pv-orb-cta { opacity: 0; }
.pv-art-orb--photo:hover .pv-orb-cta { opacity: 0.95; }
.pv-orb-file { display: none; }

/* ===== Projects page (escritorio) ===== */
.projects-scroll { padding-bottom: 24px; }
.projects-page { display: flex; flex-direction: column; gap: 16px; }
.projects-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.projects-header-left { display: flex; align-items: flex-start; gap: 14px; }
.projects-header-icon { width: 42px; height: 42px; border-radius: 10px; background: rgba(139,92,246,.15); border: 1px solid rgba(139,92,246,.25); display: flex; align-items: center; justify-content: center; color: var(--purple-bright); flex-shrink: 0; }
.projects-header-icon svg { width: 20px; height: 20px; }
.projects-title { font-size: 22px; font-weight: 700; margin: 0; color: var(--text); }
.projects-subtitle { font-size: 13px; color: var(--text2); margin: 4px 0 0; line-height: 1.45; }
.btn-new-project { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 10px 16px; font-size: 13px; }
.btn-new-project svg { width: 16px; height: 16px; }
.projects-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .projects-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px; }
.stat-card-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-card-icon svg { width: 18px; height: 18px; }
.stat-card-icon.purple { background: rgba(139,92,246,.2); color: var(--purple-bright); }
.stat-card-icon.blue { background: rgba(59,130,246,.2); color: #60a5fa; }
.stat-card-icon.green { background: rgba(34,197,94,.2); color: var(--green); }
.stat-card-icon.orange { background: rgba(249,115,22,.2); color: #fb923c; }
.stat-card-label { display: block; font-size: 11px; color: var(--text2); margin-bottom: 2px; }
.stat-card-value { font-size: 22px; font-weight: 700; color: var(--text); }
.projects-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-box { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 10px; }
.search-box svg { width: 16px; height: 16px; color: var(--text2); flex-shrink: 0; }
.search-box input { flex: 1; font-size: 13px; color: var(--text); background: transparent; border: none; outline: none; min-width: 0; }
.toolbar-select { padding: 8px 12px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 10px; font-size: 12px; color: var(--text2); }
.view-toggle { display: flex; gap: 4px; margin-left: auto; }
.view-toggle-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 10px; color: var(--text2); background: transparent; cursor: pointer; }
.view-toggle-btn svg { width: 16px; height: 16px; }
.view-toggle-btn.active, .view-toggle-btn:hover { background: rgba(139,92,246,.12); border-color: rgba(139,92,246,.3); color: var(--purple-bright); }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .projects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.projects-grid.list-view { grid-template-columns: 1fr; }
.projects-grid .project-card { cursor: pointer; }
.project-card { background: rgba(16,18,28,.85); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-height: 168px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.project-card:hover { border-color: rgba(139,92,246,.35); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.project-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.project-card-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.project-card-icon.purple { background: rgba(139,92,246,.15); color: var(--purple-bright); }
.project-card-icon.blue { background: rgba(59,130,246,.15); color: #60a5fa; }
.project-card-icon.green { background: rgba(34,197,94,.15); color: #4ade80; }
.project-card-icon.orange { background: rgba(249,115,22,.15); color: #fb923c; }
.project-card-icon.pink { background: rgba(236,72,153,.15); color: #f472b6; }
.project-card-icon.red { background: rgba(239,68,68,.15); color: #f87171; }
.project-card-icon.yellow { background: rgba(234,179,8,.15); color: #facc15; }
.project-card-icon.indigo { background: rgba(99,102,241,.15); color: #818cf8; }
.project-card-icon.cyan { background: rgba(6,182,212,.15); color: #22d3ee; }
.project-card-icon.gray { background: rgba(148,163,184,.15); color: #94a3b8; }
.project-card-emoji { font-size: 18px; line-height: 1; }
.project-card-bell { color: var(--text2); padding: 4px; border-radius: 6px; opacity: .5; background: none; border: none; cursor: pointer; }
.project-card:hover .project-card-bell { opacity: 1; }
.project-card-bell svg { width: 15px; height: 15px; }
.project-card-title { font-size: 14px; font-weight: 600; color: var(--text); }
.project-card-badge { display: inline-block; font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 10px; width: fit-content; }
.project-card-badge.progress { background: rgba(139,92,246,.15); color: var(--purple-bright); }
.project-card-badge.active { background: rgba(34,197,94,.15); color: var(--green); }
.project-card-badge.paused { background: rgba(148,163,184,.15); color: var(--text2); }
.project-card-badge.done { background: rgba(59,130,246,.15); color: #60a5fa; }
.project-card-desc { font-size: 11px; color: var(--text2); line-height: 1.4; flex: 1; margin: 0; }
.project-card-progress { display: flex; align-items: center; gap: 8px; }
.project-card-progress .progress-bar { flex: 1; height: 4px; margin-top: 0; }
.progress-fill { height: 100%; border-radius: 2px; }
.progress-fill.purple { background: var(--purple); }
.project-card-progress span { font-size: 11px; color: var(--text2); min-width: 32px; text-align: right; }
.project-card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--text2); padding-top: 4px; border-top: 1px solid var(--border); }
.project-card-time { display: inline-flex; align-items: center; gap: 5px; }
.project-card-time svg { width: 12px; height: 12px; flex-shrink: 0; }
.project-card-menu { color: var(--text2); padding: 4px; border-radius: 4px; opacity: .6; background: none; border: none; cursor: pointer; }
.project-card-menu svg { width: 16px; height: 16px; }
.project-card:hover .project-card-menu { opacity: 1; }
.projects-empty { text-align: center; padding: 48px 24px; background: rgba(255,255,255,.03); border: 1px dashed var(--border); border-radius: 14px; }
.projects-empty-icon { font-size: 40px; margin-bottom: 12px; }
.projects-empty h3 { font-size: 18px; margin: 0 0 6px; color: var(--text); }
.projects-empty p { font-size: 13px; color: var(--text2); margin: 0 0 16px; }
.projects-footer { display: flex; justify-content: center; padding: 8px 0 4px; }
.projects-see-all { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text2); padding: 8px 16px; border-radius: 8px; background: none; border: none; cursor: pointer; }
.projects-see-all svg { width: 16px; height: 16px; }
.projects-see-all:hover { color: var(--purple-bright); background: rgba(139,92,246,.08); }
.project-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 5000; padding: 24px; }
.project-modal { width: 100%; max-width: 480px; background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.project-modal-title { font-size: 18px; margin: 0 0 16px; color: var(--text); }
.project-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

.projects-create-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 24px;
}

.projects-create-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.projects-create-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.projects-create-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.projects-create-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.projects-create-card textarea.user-field {
  min-height: 110px;
  resize: vertical;
}

.projects-create-actions {
  margin-top: 12px;
  padding-top: 8px;
}

.vida-header-actions { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.vida-empty-inline { color: var(--text2); font-size: 13px; padding: 16px 0; }
.vida-examples-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vida-examples-banner.hidden { display: none !important; }
.vida-examples-banner span { color: var(--purple-bright); font-size: 13px; font-weight: 600; }
.vida-examples-banner small { color: var(--text2); font-size: 11px; }
.vida-np.hidden { display: none !important; }
#vida-create-view { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }

/* Constructor / Código: evitar pantalla negra por colapso de altura */
.codigo-page.screen-shell,
.codigo-page.constructor-ide {
  min-height: calc(100dvh - var(--header-h, 56px) - 24px);
  background: var(--bg, #0a0a12);
  color: var(--text, #e8e8f0);
}
.codigo-page .codigo-editor-body {
  min-height: 220px;
}
