/* Nucleus — identidad visual alineada al Manual de Marca nggomez v3:
   sobria, editorial, alto contraste. Negro #141414 · Off-white #F7F5F0 · Crema #E8E6E1
   Lima #C8FF00 (acento, con criterio) · Violeta #764ba2 (palabra destacada)
   DM Serif Display (títulos, itálica de acento) · Instrument Sans (cuerpo) · DM Mono (etiquetas y datos) */

:root {
  /* marca */
  --ink: #141414; --ink-2: #1C1C1C; --paper: #F7F5F0; --cream: #E8E6E1;
  --gray: #8E8E8E; --lime: #C8FF00; --violet-b: #764ba2; --ember: #FF4D00;

  /* tokens semánticos (los consume también el JS vía var(--x)) */
  --bg: #141414;
  --bg2: rgba(30, 30, 30, 0.58);
  --bg3: rgba(255, 255, 255, 0.045);
  --bg4: rgba(255, 255, 255, 0.085);
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.14);
  --text: #F7F5F0; --text2: #BDBAB2; --text3: #8E8E8E;
  --indigo: #C8FF00; --indigo2: #C8FF00; --violet: #A67DD8;
  --green: #C8FF00; --green2: #D9FF66;
  --yellow: #F2B84B; --yellow2: #F6CB76;
  --red: #FF4D00; --red2: #FF7A45; --blue: #8FA3B8;

  --serif: 'DM Serif Display', serif;
  --sans: 'Instrument Sans', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;

  --r: 18px; --r-sm: 12px; --sidebar: 236px;
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 0.35s var(--spring);
  --glass-fill: linear-gradient(180deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.018) 100%);
  --glass-edge: inset 0 1px 0 rgba(255,255,255,0.07), 0 24px 60px -32px rgba(0,0,0,0.85);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); min-height: 100dvh; display: flex; overflow-x: hidden; }
::selection { background: var(--lime); color: var(--ink); }
button, input, textarea, select { font-family: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
em.acc, .view-title em, .page-title em, .modal-title em { font-style: italic; color: var(--lime); }
.hl { color: var(--violet); }

/* ═══ ATMÓSFERA: orbes ambientales + grano de papel ═══ */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; will-change: transform; }
.orb-1 { width: 58vmax; height: 58vmax; top: -22vmax; right: -16vmax; background: radial-gradient(circle, rgba(200,255,0,0.10) 0%, transparent 62%); animation: drift1 34s var(--spring) infinite alternate; }
.orb-2 { width: 64vmax; height: 64vmax; bottom: -30vmax; left: -18vmax; background: radial-gradient(circle, rgba(118,75,162,0.30) 0%, transparent 60%); animation: drift2 42s ease-in-out infinite alternate; }
.orb-3 { width: 30vmax; height: 30vmax; top: 40%; left: 45%; background: radial-gradient(circle, rgba(232,230,225,0.05) 0%, transparent 65%); animation: drift3 26s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate3d(-12vmax, 14vmax, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(16vmax, -10vmax, 0) scale(0.9); } }
@keyframes drift3 { to { transform: translate3d(-18vmax, -12vmax, 0) scale(1.3); } }
body::after { content: ''; position: fixed; inset: 0; z-index: 300; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ═══ GLASS ═══ */
.sidebar, .topbar, .card, .kanban-col, .okr-card, .diario-editor, .ref-card, .modal, .chat-panel, .bottom-nav {
  background: var(--glass-fill), var(--bg2);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--border); box-shadow: var(--glass-edge);
}

/* ═══ SIDEBAR ═══ */
.sidebar { width: var(--sidebar); height: 100dvh; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; z-index: 50; padding: 22px 0 18px; border-width: 0 1px 0 0; box-shadow: none; }
.sidebar-logo { display: flex; align-items: center; gap: 11px; padding: 0 22px 22px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.logo-icon { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--cream); }
.logo-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-text { font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; color: var(--paper); line-height: 1; }
.logo-text em { font-style: italic; color: var(--lime); }
.nav-wrap { position: relative; flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.nav-glider { position: absolute; left: 12px; right: 12px; top: 0; height: 38px; border-radius: 10px; background: rgba(255,255,255,0.065); border: 1px solid var(--border); pointer-events: none; opacity: 0; transition: transform 0.55s var(--spring), height 0.55s var(--spring), opacity 0.3s; z-index: 0; }
.nav-glider::before { content: ''; position: absolute; left: -1px; top: 50%; width: 3px; height: 16px; margin-top: -8px; border-radius: 0 3px 3px 0; background: var(--lime); }
.nav-group { padding: 0 12px; margin-bottom: 6px; position: relative; z-index: 1; }
.nav-label { font-family: var(--mono); font-size: 10px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text3); padding: 10px 10px 6px; opacity: 0.8; }
.nav-item { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 10px; cursor: pointer; color: var(--text2); font-size: 13.5px; font-weight: 500; text-decoration: none; margin-bottom: 1px; transition: color var(--t), transform var(--t); position: relative; }
.nav-item:hover { color: var(--paper); transform: translateX(2px); }
.nav-item.active { color: var(--paper); }
.nav-item .ic { opacity: 0.75; transition: opacity var(--t); }
.nav-item.active .ic, .nav-item:hover .ic { opacity: 1; }
.nav-icon { display: none; }
.sidebar-bottom { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--border); position: relative; z-index: 1; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; }
.user-avatar { width: 34px; height: 34px; background: var(--cream); color: var(--ink); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 15px; flex-shrink: 0; }
.user-name { font-size: 12.5px; font-weight: 600; }
.user-role { font-family: var(--mono); font-size: 10px; color: var(--text3); letter-spacing: 0.04em; }

/* ═══ MAIN / TOPBAR ═══ */
.main { margin-left: var(--sidebar); flex: 1; min-width: 0; min-height: 100dvh; display: flex; flex-direction: column; position: relative; z-index: 1; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; position: sticky; top: 0; z-index: 40; border-width: 0 0 1px 0; box-shadow: none; background: linear-gradient(180deg, rgba(20,20,20,0.72), rgba(20,20,20,0.45)); }
.topbar-left { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.page-title { font-family: var(--serif); font-size: 23px; font-weight: 400; letter-spacing: -0.01em; white-space: nowrap; }
.page-date { font-family: var(--mono); font-size: 11px; color: var(--text3); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.tbtn { height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; border: none; transition: transform var(--t), background var(--t), color var(--t), border-color var(--t); position: relative; overflow: hidden; white-space: nowrap; }
.tbtn .ic { width: 15px; height: 15px; }
.tbtn:active, .btn:active, .brief-btn:active, .voice-btn:active, .chat-fab:active, .sem-btn:active, .step-opt:active { transform: scale(0.97); }
.tbtn-ghost { background: rgba(255,255,255,0.03); color: var(--text2); border: 1px solid var(--border2); }
.tbtn-ghost:hover { background: rgba(255,255,255,0.08); color: var(--paper); }
.tbtn-primary, .btn-ok { background: var(--lime); color: var(--ink); }
.tbtn-primary::after, .btn-ok::after, .chat-fab::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.55) 50%, transparent 65%); transform: translateX(-120%); transition: transform 0.7s var(--spring); pointer-events: none; }
.tbtn-primary:hover::after, .btn-ok:hover::after, .chat-fab:hover::after { transform: translateX(120%); }
.tbtn-primary:hover, .btn-ok:hover { transform: translateY(-1px); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); cursor: pointer; position: relative; margin-right: 4px; }
.sync-dot.ok { background: var(--lime); }
.sync-dot.ok::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--lime); animation: ping 2.6s var(--spring) infinite; }
.sync-dot.err { background: var(--red); }
.sync-dot.local { background: var(--yellow); }
@keyframes ping { 0% { transform: scale(1); opacity: 0.8; } 80%, 100% { transform: scale(3.2); opacity: 0; } }

/* ═══ CONTENT / VIEWS ═══ */
.content { padding: 30px 32px 110px; flex: 1; width: 100%; max-width: 1480px; }
.view { display: none; }
.view.active { display: block; animation: viewIn 0.5s var(--spring) both; }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }
.rv { animation: rise 0.75s var(--spring) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.985); } to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); } }

.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.view-eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text3); margin-bottom: 8px; }
.view-title { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.02; letter-spacing: -0.015em; margin-bottom: 8px; }
.view-sub { font-size: 13px; color: var(--text3); max-width: 62ch; line-height: 1.55; }
.view-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ═══ QUOTE — pieza de cita en crema, firma visual de la marca ═══ */
.quote-card { background: var(--cream); color: var(--ink); border-radius: var(--r); padding: 30px 34px 22px; margin-bottom: 22px; position: relative; overflow: hidden; box-shadow: 0 30px 70px -40px rgba(0,0,0,0.9); }
.quote-card::before { content: ''; position: absolute; inset: 0; opacity: 0.35; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.43 0 0 0 0 0.4 0 0 0 0.35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"); }
.quote-card > * { position: relative; }
.quote-text { font-family: var(--serif); font-size: clamp(20px, 2.1vw, 27px); line-height: 1.28; letter-spacing: -0.01em; margin-bottom: 18px; max-width: 46ch; transition: opacity 0.35s var(--spring), transform 0.5s var(--spring); }
.quote-text.swap { opacity: 0; transform: translateY(8px); }
.quote-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quote-author { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #55534e; display: flex; align-items: center; gap: 10px; }
.quote-dot { width: 22px; height: 10px; background: var(--lime); border-radius: 2px; }
.quote-next { background: var(--ink); border: none; border-radius: 999px; padding: 8px 16px; font-size: 11.5px; font-weight: 600; color: var(--paper); cursor: pointer; transition: transform var(--t); white-space: nowrap; }
.quote-next:hover { transform: translateX(3px); }

/* ═══ GRID / CARDS ═══ */
.dash-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; margin-bottom: 20px; }
.dash-grid-3 { grid-template-columns: 290px minmax(0, 1fr) 280px; }
@media (max-width: 1240px) { .dash-grid-3 { grid-template-columns: 290px minmax(0, 1fr); } .dash-grid-3 #agendaCard { grid-column: 1 / -1; } }
.hamb { display: none; background: rgba(255,255,255,0.04); border: 1px solid var(--border2); border-radius: 10px; color: var(--text2); width: 38px; height: 38px; align-items: center; justify-content: center; cursor: pointer; margin-right: 4px; align-self: center; }
.card { border-radius: var(--r); padding: 22px; position: relative; }
.card, .okr-card, .kanban-col, .ref-card, .diario-editor { transition: border-color var(--t), transform var(--t); }
.spot::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s var(--spring);
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(200,255,0,0.06), transparent 42%); }
.spot:hover::before { opacity: 1; }
.spot:hover { border-color: rgba(255,255,255,0.13); }
.card-label { font-family: var(--mono); font-size: 10.5px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text3); margin-bottom: 14px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card-title { font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: -0.005em; }
.card-title em { font-style: italic; color: var(--lime); }

/* ═══ SEMÁFORO ═══ */
.sem-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.sem-btn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--border); background: rgba(255,255,255,0.02); color: var(--text2); font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--t); text-align: left; }
.sem-btn:hover { border-color: var(--border2); color: var(--paper); background: rgba(255,255,255,0.05); transform: translateX(2px); }
.sem-icon, .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; position: relative; display: inline-block; }
.sem-btn[data-sem="verde"] .sem-icon, .dot-verde { background: var(--green); }
.sem-btn[data-sem="amarillo"] .sem-icon, .dot-amarillo { background: var(--yellow); }
.sem-btn[data-sem="rojo"] .sem-icon, .dot-rojo { background: var(--red); }
.sem-btn.s-verde, .sem-btn.s-amarillo, .sem-btn.s-rojo { color: var(--paper); }
.sem-btn.s-verde { border-color: rgba(200,255,0,0.5); background: rgba(200,255,0,0.07); }
.sem-btn.s-amarillo { border-color: rgba(242,184,75,0.5); background: rgba(242,184,75,0.08); }
.sem-btn.s-rojo { border-color: rgba(255,77,0,0.5); background: rgba(255,77,0,0.08); }
.sem-btn[class*="s-"] .sem-icon::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid currentColor; opacity: 0; animation: breathe 2.4s ease-in-out infinite; }
.sem-btn.s-verde .sem-icon::after { color: var(--green); }
.sem-btn.s-amarillo .sem-icon::after { color: var(--yellow); }
.sem-btn.s-rojo .sem-icon::after { color: var(--red); }
@keyframes breathe { 0%, 100% { transform: scale(0.8); opacity: 0; } 50% { transform: scale(1.25); opacity: 0.7; } }
.sem-desc { font-family: var(--mono); font-size: 10px; font-weight: 400; color: var(--text3); margin-top: 2px; letter-spacing: 0.02em; }
.sem-hint { font-size: 12px; color: var(--text3); line-height: 1.55; padding-top: 14px; border-top: 1px solid var(--border); }

/* ═══ TAGS / BADGES / PROGRESS ═══ */
.tag { font-family: var(--mono); font-size: 10px; font-weight: 400; padding: 3px 7px; border-radius: 6px; letter-spacing: 0.02em; white-space: nowrap; }
.t-urg { background: rgba(255,77,0,0.12); color: var(--red2); }
.t-imp { background: rgba(242,184,75,0.12); color: var(--yellow2); }
.t-plan { background: rgba(143,163,184,0.13); color: #B7C5D3; }
.t-proj { background: rgba(255,255,255,0.04); color: var(--text2); border: 1px solid var(--border); }
.t-okr { background: rgba(200,255,0,0.1); color: var(--lime); }
.t-time { background: rgba(255,255,255,0.04); color: var(--text3); }
.t-parent { background: rgba(166,125,216,0.14); color: #C7A9EC; }
.badge { font-family: var(--mono); background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; font-size: 10.5px; color: var(--text2); }
.prog-bar { height: 4px; background: rgba(255,255,255,0.07); border-radius: 4px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 4px; background: var(--lime); transition: width 1s var(--spring); position: relative; overflow: hidden; }
.prog-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent); transform: translateX(-100%); animation: sheen 3.2s ease-in-out infinite; }
@keyframes sheen { 60%, 100% { transform: translateX(100%); } }
.prog-fill.g { background: var(--green); }
.prog-fill.y { background: var(--yellow); }
.prog-fill.r { background: var(--red); }

/* ═══ DASH TASKS ═══ */
.task-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: var(--r-sm); border: 1px solid transparent; transition: background var(--t), border-color var(--t); margin-bottom: 4px; position: relative; }
.task-item:hover { background: rgba(255,255,255,0.04); }
.task-item.pending-confirm { background: rgba(200,255,0,0.06); border-color: rgba(200,255,0,0.4); }
.task-check { width: 20px; height: 20px; border: 1.5px solid var(--border2); border-radius: 6px; flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--t); font-size: 12px; color: var(--ink); }
.task-check:hover { border-color: var(--lime); background: rgba(200,255,0,0.15); transform: scale(1.08); }
.task-body { flex: 1; min-width: 0; cursor: pointer; }
.task-name { font-size: 13.5px; font-weight: 500; margin-bottom: 6px; line-height: 1.4; }
.task-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.confirm-btn { background: var(--lime); color: var(--ink); border: none; border-radius: 8px; padding: 5px 12px; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform var(--t); white-space: nowrap; flex-shrink: 0; align-self: center; }
.confirm-btn:hover { transform: scale(1.05); }

/* ═══ BRIEFING / VOZ ═══ */
.brief-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-bottom: 20px; }
.brief-btn, .voice-btn { border-radius: var(--r); padding: 22px 24px; cursor: pointer; display: flex; align-items: center; gap: 18px; transition: transform var(--t), border-color var(--t), background var(--t); text-align: left; position: relative; overflow: hidden; }
.brief-btn { background: var(--lime); color: var(--ink); border: none; }
.brief-btn::after { content: ''; position: absolute; width: 220px; height: 220px; right: -60px; top: -90px; border-radius: 50%; border: 1px solid rgba(20,20,20,0.18); box-shadow: 0 0 0 28px rgba(20,20,20,0.04), 0 0 0 56px rgba(20,20,20,0.03); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brief-btn:hover, .voice-btn:hover { transform: translateY(-3px); }
.voice-btn { background: var(--glass-fill), var(--bg2); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); border: 1px solid var(--border2); color: var(--text); }
.voice-btn:hover { border-color: rgba(200,255,0,0.4); }
.voice-btn.recording { border-color: var(--red); background: rgba(255,77,0,0.08); }
.voice-btn.recording .brief-icon { color: var(--red); animation: rec 1.3s ease-in-out infinite; }
@keyframes rec { 50% { transform: scale(1.15); opacity: 0.6; } }
.brief-icon { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid currentColor; }
.brief-icon .ic { width: 20px; height: 20px; }
.brief-btn .brief-icon { border-color: rgba(20,20,20,0.3); }
.brief-text h3 { font-family: var(--serif); font-size: 22px; font-weight: 400; margin-bottom: 3px; letter-spacing: -0.01em; }
.brief-text p { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.voice-bars { display: none; gap: 3px; align-items: center; height: 18px; margin-left: auto; }
.voice-btn.recording .voice-bars { display: flex; }
.voice-bars i { width: 3px; height: 100%; background: var(--red); border-radius: 2px; animation: bar 0.9s ease-in-out infinite; transform-origin: center; }
.voice-bars i:nth-child(2) { animation-delay: 0.15s; } .voice-bars i:nth-child(3) { animation-delay: 0.3s; } .voice-bars i:nth-child(4) { animation-delay: 0.45s; }
@keyframes bar { 0%, 100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }

/* ═══ KANBAN ═══ */
.kanban-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1180px) { .kanban-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kanban-col { border-radius: var(--r); padding: 16px 14px; min-height: 220px; position: relative; }
.kanban-col-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding: 0 2px; }
.kcol-title { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; color: var(--text2); }
.col-dot { width: 7px; height: 7px; border-radius: 50%; }
.kanban-card { background: rgba(255,255,255,0.035); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 13px; margin-bottom: 8px; cursor: pointer; transition: transform var(--t), border-color var(--t), background var(--t); }
.kanban-card:hover { border-color: rgba(200,255,0,0.35); background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.kanban-card.subtask { margin-left: 12px; border-left: 2px solid var(--violet); }
.kcard-title { font-size: 13px; font-weight: 500; margin-bottom: 9px; line-height: 1.42; }
.kcard-deadline { font-family: var(--mono); font-size: 10px; color: var(--text3); margin-bottom: 7px; display: flex; align-items: center; gap: 4px; }
.kcard-deadline.overdue { color: var(--red2); }
.kcard-deadline.soon { color: var(--yellow2); }
.kcard-deadline.ok { color: var(--green2); }
.kcard-tags { display: flex; gap: 4px; flex-wrap: wrap; }

/* ═══ OKRs ═══ */
.okr-card { border-radius: var(--r); padding: 24px; margin-bottom: 14px; position: relative; }
.okr-obj-title { font-family: var(--serif); font-size: 23px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.15; margin-bottom: 6px; }
.okr-obj-meta { font-family: var(--mono); font-size: 10.5px; color: var(--text3); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kr-item { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 13px 15px; margin-bottom: 8px; }
.kr-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; gap: 8px; }
.kr-title { font-size: 13px; font-weight: 500; flex: 1; }
.kr-pct { font-family: var(--mono); font-size: 12px; color: var(--lime); min-width: 40px; text-align: right; }
.kr-del { background: transparent; border: none; color: var(--text3); cursor: pointer; font-size: 12px; }
.kr-del:hover { color: var(--red2); }
.kr-slider, input[type="range"] { width: 100%; accent-color: var(--lime); cursor: pointer; }
.okr-add-kr { background: transparent; border: 1px dashed var(--border2); border-radius: 10px; padding: 9px 14px; font-size: 12px; color: var(--text3); cursor: pointer; width: 100%; margin-top: 10px; transition: all var(--t); }
.okr-add-kr:hover { border-color: rgba(200,255,0,0.5); color: var(--lime); background: rgba(200,255,0,0.04); }

/* ═══ MODALES / FORMS ═══ */
.overlay { display: none; position: fixed; inset: 0; background: rgba(12,12,12,0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 100; align-items: center; justify-content: center; padding: 16px; }
.overlay.open { display: flex; animation: viewIn 0.3s var(--spring) both; }
.modal { border-radius: 22px; padding: 30px; max-width: 540px; width: 100%; max-height: 90dvh; overflow-y: auto; background: var(--glass-fill), rgba(26,26,26,0.78); border-color: var(--border2); animation: modalIn 0.55s var(--spring) both; }
@keyframes modalIn { from { opacity: 0; transform: translate3d(0, 20px, 0) scale(0.96); } to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); } }
.modal-h { margin-bottom: 22px; }
.modal-title { font-family: var(--serif); font-size: 28px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.1; margin-bottom: 6px; }
.modal-sub { font-size: 12.5px; color: var(--text3); }
.modal-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 18px; border-top: 1px solid var(--border); margin-top: 22px; flex-wrap: wrap; }
.btn { padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: transform var(--t), background var(--t), color var(--t); position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 7px; }
.btn .ic { width: 15px; height: 15px; }
.btn-sec { background: rgba(255,255,255,0.05); color: var(--text2); border: 1px solid var(--border2); }
.btn-sec:hover { background: rgba(255,255,255,0.1); color: var(--paper); }
.btn-danger { background: rgba(255,77,0,0.1); color: var(--red2); border: 1px solid rgba(255,77,0,0.3); }
.btn-danger:hover { background: rgba(255,77,0,0.18); }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text3); margin-bottom: 7px; }
.field input, .field textarea, .field select { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--border2); border-radius: 10px; padding: 11px 13px; color: var(--text); font-size: 13.5px; outline: none; transition: border-color var(--t), box-shadow var(--t), background var(--t); resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .ref-input:focus, .chat-input:focus { border-color: rgba(200,255,0,0.6); box-shadow: 0 0 0 3px rgba(200,255,0,0.1); background: rgba(255,255,255,0.06); }
.field select option { background: #1C1C1C; color: var(--text); }
.field input[type="date"] { color-scheme: dark; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.help { font-size: 11px; color: var(--text3); margin-top: 6px; line-height: 1.55; }
.col-move-row { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.col-move-btn { padding: 6px 11px; border-radius: 8px; font-family: var(--mono); font-size: 10.5px; cursor: pointer; border: 1px solid var(--border2); background: rgba(255,255,255,0.03); color: var(--text3); transition: all var(--t); }
.col-move-btn:hover { border-color: rgba(200,255,0,0.5); color: var(--paper); }
.col-move-btn.cur { border-color: var(--lime); color: var(--ink); background: var(--lime); }

/* ═══ BRIEFING STEPS ═══ */
.bstep { display: none; }
.bstep.active { display: block; animation: rise 0.5s var(--spring) both; }
.step-label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--lime); margin-bottom: 10px; }
.step-q { font-family: var(--serif); font-size: 22px; font-weight: 400; margin-bottom: 16px; line-height: 1.25; }
.step-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.step-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--border); cursor: pointer; font-size: 13px; transition: all var(--t); background: rgba(255,255,255,0.02); color: var(--text); text-align: left; }
.step-opt:hover { border-color: var(--border2); background: rgba(255,255,255,0.05); }
.step-opt.sel { border-color: rgba(200,255,0,0.6); background: rgba(200,255,0,0.08); }
.step-ctr { font-family: var(--mono); font-size: 11px; color: var(--text3); }
.ref-input { width: 100%; background: rgba(255,255,255,0.035); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; color: var(--text); font-size: 13px; resize: none; outline: none; line-height: 1.6; transition: border-color var(--t), box-shadow var(--t); margin-bottom: 12px; }

/* ═══ DIARIO / LIBRO ═══ */
.diario-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
.diario-editor { border-radius: var(--r); padding: 30px; position: relative; }
.d-date { font-family: var(--mono); font-size: 10.5px; color: var(--text3); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.14em; }
.d-title-input { width: 100%; background: transparent; border: none; outline: none; font-family: var(--serif); font-size: clamp(26px, 2.6vw, 34px); font-weight: 400; color: var(--text); margin-bottom: 18px; letter-spacing: -0.01em; }
.d-title-input::placeholder { color: rgba(247,245,240,0.28); font-style: italic; }
.d-body { width: 100%; background: transparent; border: none; outline: none; font-size: 15px; color: var(--text2); resize: none; min-height: 320px; line-height: 1.85; }
.d-body::placeholder, .ref-input::placeholder, .field input::placeholder, .field textarea::placeholder, .chat-input::placeholder { color: rgba(142,142,142,0.7); }
.ref-card { border-radius: var(--r); padding: 22px; margin-bottom: 14px; position: relative; }
.ref-q { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 9px; display: flex; align-items: flex-start; gap: 8px; }
.ref-q .n { font-family: var(--mono); font-size: 10.5px; color: var(--lime); margin-top: 2px; font-weight: 400; }
.diario-entry { padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 6px; cursor: pointer; font-size: 12.5px; color: var(--text2); transition: all var(--t); }
.diario-entry:hover { border-color: rgba(200,255,0,0.4); color: var(--paper); transform: translateX(3px); }

/* ═══ REPORTES ═══ */
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.rep-num { font-family: var(--serif); font-size: 40px; font-weight: 400; line-height: 1; margin-bottom: 8px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rep-sub { font-family: var(--mono); font-size: 10.5px; color: var(--text3); letter-spacing: 0.06em; text-transform: uppercase; }
.sem-hist { display: flex; gap: 6px; flex-wrap: wrap; }
.sem-day { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); }
#informeText { width: 100%; min-height: 280px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px; padding: 16px; color: var(--text2); font-size: 12.5px; font-family: var(--mono); line-height: 1.75; }

/* ═══ CHAT ═══ */
.chat-fab { position: fixed; bottom: 24px; right: 24px; z-index: 90; background: var(--lime); border: none; border-radius: 999px; padding: 0 20px 0 16px; height: 50px; color: var(--ink); font-size: 13.5px; font-weight: 700; cursor: pointer; box-shadow: 0 18px 40px -16px rgba(0,0,0,0.9); display: flex; align-items: center; gap: 10px; transition: transform var(--t); overflow: hidden; }
.chat-fab:hover { transform: translateY(-3px); }
.chat-fab .fab-core { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); position: relative; flex-shrink: 0; }
.chat-fab .fab-core::before, .chat-fab .fab-core::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--lime); animation: core 2.2s ease-in-out infinite; }
.chat-fab .fab-core::after { inset: -4px; background: transparent; border: 1px solid var(--ink); animation: ping 2.2s var(--spring) infinite; }
@keyframes core { 50% { transform: scale(0.55); } }
.chat-panel { position: fixed; bottom: 86px; right: 24px; z-index: 90; width: 400px; height: min(580px, calc(100dvh - 120px)); border-radius: 22px; display: flex; flex-direction: column; background: var(--glass-fill), rgba(24,24,24,0.8); border-color: var(--border2); transform-origin: bottom right; animation: modalIn 0.5s var(--spring) both; overflow: hidden; }
.chat-panel.hidden { display: none; }
.chat-header { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.chat-header-title { font-family: var(--serif); font-size: 19px; display: flex; align-items: center; gap: 10px; }
.chat-header-title em { font-style: italic; color: var(--lime); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); position: relative; }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--lime); animation: ping 2.4s var(--spring) infinite; }
.chat-close { background: transparent; border: none; color: var(--text3); cursor: pointer; width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; transition: background var(--t), color var(--t); }
.chat-close:hover { color: var(--paper); background: rgba(255,255,255,0.07); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; animation: rise 0.45s var(--spring) both; }
.chat-msg.user { background: var(--paper); color: var(--ink); align-self: flex-end; border-radius: 16px 16px 4px 16px; }
.chat-msg.ai { background: rgba(255,255,255,0.05); color: var(--text); align-self: flex-start; border-radius: 16px 16px 16px 4px; border: 1px solid var(--border); }
.chat-msg.sys { background: transparent; color: var(--text3); align-self: center; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; }
.chat-input-row { padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-input { flex: 1; min-width: 0; background: rgba(255,255,255,0.04); border: 1px solid var(--border2); border-radius: 12px; padding: 10px 13px; color: var(--text); font-size: 13px; outline: none; transition: border-color var(--t), box-shadow var(--t); }
.chat-send { background: var(--lime); border: none; border-radius: 12px; width: 42px; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform var(--t); flex-shrink: 0; }
.chat-send:hover { transform: translateY(-1px); }
.chat-send.ghost { background: rgba(255,255,255,0.05); border: 1px solid var(--border2); color: var(--text2); }
.tool-card { align-self: flex-start; width: 92%; background: rgba(200,255,0,0.05); border: 1px solid rgba(200,255,0,0.28); border-radius: 14px; padding: 13px 15px; font-size: 12.5px; animation: rise 0.45s var(--spring) both; }
.tool-card-title { font-family: var(--mono); color: var(--lime); margin-bottom: 8px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; }
.tool-card-body { color: var(--text2); line-height: 1.6; margin-bottom: 11px; white-space: pre-wrap; }
.tool-card-actions { display: flex; gap: 8px; }
.tool-accept { background: var(--lime); color: var(--ink); border: none; border-radius: 9px; padding: 7px 14px; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.tool-reject { background: rgba(255,255,255,0.05); color: var(--text2); border: 1px solid var(--border2); border-radius: 9px; padding: 7px 14px; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.chat-typing { align-self: flex-start; color: var(--text3); font-family: var(--mono); font-size: 11px; padding: 4px 8px; }

/* ═══ LOGIN ═══ */
#loginModal { background: rgba(20,20,20,0.9); }
.login-mark { width: 60px; height: 60px; border-radius: 16px; overflow: hidden; margin: 0 auto 18px; background: var(--cream); animation: float 5s ease-in-out infinite; }
.login-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes float { 50% { transform: translateY(-6px); } }
#lgKey { flex: 1; background: rgba(255,255,255,0.04); border: 1px solid var(--border2); border-radius: 10px; padding: 9px 11px; color: var(--text); font-size: 12px; outline: none; }
details summary { font-size: 11.5px; color: var(--text3); cursor: pointer; }

.link-btn { display: block; width: 100%; margin-top: 14px; background: none; border: none; color: var(--text2); font-size: 12.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(200,255,0,0.5); }
.link-btn:hover { color: var(--lime); }
.rec-step { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--border); }
.rec-n { font-family: var(--mono); font-size: 11px; color: var(--lime); padding-top: 2px; }
.rec-t { font-weight: 600; font-size: 13.5px; }
.rec-list { margin: 8px 0 0 16px; font-size: 12px; color: var(--text2); line-height: 1.65; }
.rec-list li { margin-bottom: 4px; }
.pair-input { flex: 1; min-width: 0; background: rgba(255,255,255,0.04); border: 1px solid var(--border2); border-radius: 10px; padding: 10px 12px; color: var(--text); font-family: var(--mono); font-size: 20px; letter-spacing: 0.3em; text-align: center; outline: none; }
.pair-input:focus { border-color: rgba(200,255,0,0.6); box-shadow: 0 0 0 3px rgba(200,255,0,0.1); }
.pair-box { margin-top: 12px; padding: 16px; border-radius: 14px; border: 1px solid rgba(200,255,0,0.3); background: rgba(200,255,0,0.05); text-align: center; animation: rise 0.5s var(--spring) both; }
.pair-code { font-family: var(--mono); font-size: 34px; letter-spacing: 0.28em; color: var(--lime); padding-left: 0.28em; }
#passForm input { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--border2); border-radius: 10px; padding: 11px 13px; color: var(--text); font-size: 13.5px; outline: none; }

/* ═══ TOAST ═══ */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate3d(-50%, 16px, 0); background: var(--paper); color: var(--ink); padding: 11px 20px; border-radius: 999px; font-size: 12.5px; font-weight: 600; z-index: 200; box-shadow: 0 20px 40px -18px rgba(0,0,0,0.9); opacity: 0; transition: opacity 0.35s var(--spring), transform 0.5s var(--spring); pointer-events: none; }
.toast.show { opacity: 1; transform: translate3d(-50%, 0, 0); }

/* ═══ KANBAN — ARRASTRAR ═══ */
.kanban-card { position: relative; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media (hover: hover) and (pointer: fine) { .kanban-card { cursor: grab; } }
.kanban-card.pressing::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--lime); transform-origin: left; animation: press 1.2s linear forwards; }
@keyframes press { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.kanban-card.pressing { transform: scale(0.985); }
.kanban-card.drag-src { opacity: 0.3; transform: scale(0.97); border-style: dashed; }
.drag-ghost { position: fixed; z-index: 400; margin: 0; pointer-events: none; cursor: grabbing; background: rgba(38,38,38,0.94); border-color: rgba(200,255,0,0.6); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.9); transition: none; will-change: transform; }
.kanban-col.drop-target { border-color: rgba(200,255,0,0.55); background: linear-gradient(180deg, rgba(200,255,0,0.07), rgba(200,255,0,0.015)), var(--bg2); }
.kanban-col.drop-target .kcol-title { color: var(--lime); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }

/* ═══ AVISO DE CAMBIOS SIN GUARDAR ═══ */
#confirmSheet { z-index: 150; }
#confirmSheet .modal { max-width: 400px; }

/* ═══ SCRIM DEL MENÚ MOBILE ═══ */
.scrim { display: none; }

/* ═══ RADAR Y RECORDATORIOS ═══ */
.jv-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1240px) { .jv-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } #radarCard { grid-column: 1 / -1; } }
.radar-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.radar-item[onclick] { cursor: pointer; }
.radar-item[onclick]:hover .radar-text { color: var(--lime); }
.radar-item:last-child, .rem-item:last-child { border-bottom: none; }
.radar-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--text3); }
.lv3 .radar-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(255,77,0,0.15); }
.lv2 .radar-dot { background: var(--yellow); }
.radar-text { font-size: 13.5px; color: var(--text); transition: color var(--t); }
.radar-detail { font-size: 11.5px; color: var(--text3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radar-empty { font-size: 12.5px; color: var(--text3); line-height: 1.55; padding: 6px 0; }
.radar-cta { margin-top: 14px; }
.rem-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.rem-when { font-family: var(--mono); font-size: 10.5px; color: var(--lime); min-width: 76px; white-space: nowrap; }
.rem-item.due .rem-when { color: var(--red2); }
.rem-text { flex: 1; min-width: 0; font-size: 13px; }
.rem-btn { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: transparent; color: var(--text3); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: all var(--t); }
.rem-btn .ic { width: 14px; height: 14px; }
.rem-btn:hover { color: var(--paper); border-color: var(--border2); }
.field input[type="datetime-local"] { color-scheme: dark; }

/* ═══ DESAFÍO DIARIO DE ÁREAS ═══ */
.reto-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.reto-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border2); background: rgba(255,255,255,0.03); color: var(--text2); font-size: 12.5px; cursor: pointer; transition: all var(--t); }
.reto-chip:hover { color: var(--paper); border-color: rgba(200,255,0,0.4); }
.reto-chip.on { background: var(--lime); border-color: var(--lime); color: var(--ink); font-weight: 600; }
.reto-badge { font-family: var(--mono); font-size: 9.5px; padding: 1px 5px; border-radius: 999px; background: rgba(255,255,255,0.1); }
.reto-chip.on .reto-badge { background: rgba(20,20,20,0.15); }
.reto-area { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.reto-area-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.reto-area-h span { font-family: var(--mono); font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; }
.reto-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.reto-check { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; border: 1.5px solid var(--border2); border-radius: 7px; background: transparent; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all var(--t); }
.reto-check .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.reto-check:hover { border-color: var(--lime); }
.reto-item.done .reto-check { background: var(--lime); border-color: var(--lime); }
.reto-item.done .reto-text { text-decoration: line-through; color: var(--text3); }
.reto-text { font-size: 13.5px; line-height: 1.45; }
.reto-meta { font-family: var(--mono); font-size: 10px; color: var(--text3); margin-top: 3px; }
.reto-add { display: flex; gap: 6px; margin-top: 6px; }
.reto-add input { flex: 1; min-width: 0; background: rgba(255,255,255,0.035); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; color: var(--text); font-size: 12.5px; outline: none; }
.reto-add input:focus { border-color: rgba(200,255,0,0.5); }

/* ═══ JARVIS: MODO VOZ ═══ */
.jarvis { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) 20px max(16px, env(safe-area-inset-bottom)); background: radial-gradient(120% 80% at 50% 38%, #1c1c1a 0%, #131313 60%, #0f0f0f 100%); animation: viewIn 0.45s var(--spring) both; }
.jarvis[hidden] { display: none; }
body.jv-open { overflow: hidden; }
body.jv-open .chat-fab, body.jv-open .bottom-nav { display: none; }
.jv-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(38% 28% at 50% 40%, rgba(200,255,0,0.09), transparent 70%), radial-gradient(55% 40% at 25% 85%, rgba(118,75,162,0.22), transparent 70%); }
.jv-head, .jv-main, .jv-foot { position: relative; max-width: 720px; width: 100%; margin: 0 auto; }
.jv-head { display: flex; justify-content: space-between; align-items: flex-start; }
.jv-persona { font-family: var(--serif); font-size: 21px; }
.jv-main { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.jv-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; min-height: 0; }
.jarvis.has-thread .jv-stage { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 8px 0 4px; text-align: left; }
.jarvis.has-thread .jv-orb { width: 76px; }
.jarvis.has-thread .jv-state { max-width: 260px; line-height: 1.5; }
.jv-thread { display: none; flex: 1; min-height: 0; overflow-y: auto; flex-direction: column; gap: 10px; padding: 12px 2px 10px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px); mask-image: linear-gradient(to bottom, transparent 0, #000 16px); overscroll-behavior: contain; }
.jarvis.has-thread .jv-thread { display: flex; }
.jv-msg { max-width: 88%; border-radius: 18px; padding: 12px 15px; font-size: 15px; line-height: 1.55; text-align: left; animation: rise 0.45s var(--spring) both; flex-shrink: 0; }
.jv-msg.user { align-self: flex-end; background: var(--paper); color: var(--ink); border-bottom-right-radius: 5px; }
.jv-msg.user.live { background: rgba(247,245,240,0.07); color: var(--text2); border: 1px dashed rgba(247,245,240,0.28); font-style: italic; animation: none; }
.jv-msg.ai { align-self: flex-start; background: var(--glass-fill), rgba(38,38,38,0.82); border: 1px solid var(--border); border-bottom-left-radius: 5px; color: var(--text); }
.jv-msg.sys { align-self: center; max-width: 95%; background: none; padding: 2px 8px; font-family: var(--mono); font-size: 11px; color: var(--text3); text-align: center; }
.jv-msg.clamp .jv-body { max-height: 13em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
.jv-msg.clamp.expanded .jv-body { max-height: none; -webkit-mask-image: none; mask-image: none; }
.jv-more { display: block; margin-top: 8px; background: none; border: none; padding: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); cursor: pointer; }
.jv-msg.user .jv-more { color: var(--violet-b); }
.jv-mute { display: inline-flex; align-items: center; gap: 7px; }
.jv-mute .ic { width: 15px; height: 15px; }
.jv-chips .jv-mute.on { background: rgba(255,77,0,0.14); border-color: rgba(255,77,0,0.55); color: var(--red2); }
.jv-orb { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.jv-orb.ptt .jv-core { transform: scale(1.14); }
.jv-actions { flex-shrink: 0; }

/* ═══ MARKDOWN LIVIANO ═══ */
.md p { margin: 0 0 0.55em; }
.md p:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 0.2em 0 0.55em 1.25em; padding: 0; }
.md li { margin: 0.2em 0; padding-left: 0.15em; }
.md strong { font-weight: 600; }
.md code { font-family: var(--mono); font-size: 0.9em; background: rgba(255,255,255,0.07); padding: 1px 5px; border-radius: 5px; }
.chat-msg.ai.md { white-space: normal; }
.tool-status { color: var(--lime); font-size: 11px; font-weight: 700; }

/* ═══ MISIONES DEL LABORATORIO ═══ */
.lab-lead { font-family: var(--serif); font-size: clamp(19px, 3.2vw, 23px); line-height: 1.25; margin: 2px 0 10px; }
.lab-txt { font-size: 13.5px; color: var(--text2); line-height: 1.6; margin: 0 0 12px; }
.lab-porque .lab-txt { margin-bottom: 0; }
.lab-reglas { font-size: 12.5px; color: var(--text3); line-height: 1.55; margin-top: 12px; }
.mis-guia { display: flex; gap: 12px; align-items: flex-start; background: rgba(200,255,0,0.05); border: 1px solid rgba(200,255,0,0.18); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; }
.mis-guia p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text2); }
.mis-guia p + p { margin-top: 6px; }
.mis-guia-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #e6ff80, var(--lime) 55%, #8fb300); color: var(--ink); box-shadow: 0 0 18px rgba(200,255,0,0.35); }
.mis-guia-av .ic { width: 15px; height: 15px; }
.mis-guia-lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); margin-bottom: 3px; }
.mis-guia-dyn { color: var(--paper) !important; font-weight: 500; }
.mis-guia-dyn:empty { display: none; }
.mis-pistas { border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; margin: 0 0 14px; }
.mis-pistas summary { cursor: pointer; list-style: none; padding: 11px 0; font-size: 13px; color: var(--text2); display: flex; justify-content: space-between; }
.mis-pistas summary::-webkit-details-marker { display: none; }
.mis-pistas summary::after { content: '+'; font-family: var(--mono); color: var(--text3); }
.mis-pistas[open] summary::after { content: '−'; }
.mis-pistas ul { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: var(--text2); line-height: 1.6; }
.mis-pistas li + li { margin-top: 6px; }
.mis-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.mis-tools .mis-count { margin: 0; flex: 1; }
.mis-chip.pick { outline: 2px dashed var(--lime); outline-offset: 2px; }
.mis-chips.uniendo .mis-chip { border-style: dashed; }
.mis-mas { margin-top: 12px; width: 100%; justify-content: center; }
.mis-card.bloq { opacity: 0.55; cursor: default; }
.mis-card.bloq:hover { transform: none; border-color: var(--border); }
.mis-chip-sub { display: block; font-size: 10px; font-weight: 400; opacity: 0.7; margin-top: -2px; }
.mis-chip:has(.mis-chip-sub) { padding-top: 6px; padding-bottom: 6px; text-align: left; }
.mis-chip-x { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.mis-chip-x button { background: none; border: none; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 0 0 2px; }
.mis-sug { margin-bottom: 14px; }
.mis-sug-lbl { font-size: 12px; color: var(--text3); margin-bottom: 8px; }
.mis-sug-lbl b { color: var(--lime); font-weight: 600; }
.mis-sug .mis-chip { min-height: 32px; font-size: 12.5px; }
.mis-accv { border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin-bottom: 10px; transition: border-color var(--t); }
.mis-accv.foco { border-color: rgba(200,255,0,0.4); }
.mis-accv-h { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.mis-sis { border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.mis-sis-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.mis-sis-h b { font-size: 15px; }
.mis-sis-h span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text3); }
.mis-resp-link { background: none; border: none; color: var(--lime); font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.mis-prox { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); opacity: 0.5; }
.mis-prox:last-of-type { border-bottom: none; }
.mis-prox b { font-size: 13px; font-weight: 500; }
.mis-prox span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3); white-space: nowrap; }
.mis-estacion { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); margin: 14px 0 8px; }
.mis-estacion:first-child { margin-top: 0; }
.mis-card { display: block; width: 100%; text-align: left; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 8px; cursor: pointer; transition: all var(--t); color: var(--text); }
.mis-card:hover { border-color: rgba(200,255,0,0.4); transform: translateY(-1px); }
.mis-card.hecha { border-color: rgba(200,255,0,0.3); background: rgba(200,255,0,0.05); }
.mis-card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; }
.mis-estado { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text3); white-space: nowrap; }
.mis-card.hecha .mis-estado { color: var(--lime); }
.mis-card.encurso .mis-estado { color: var(--yellow2); }
.mis-card-d { font-size: 12.5px; color: var(--text2); margin-top: 5px; line-height: 1.5; }
.mis-card-f { font-family: var(--mono); font-size: 10px; color: var(--text3); margin-top: 8px; }

.misionar { position: fixed; inset: 0; z-index: 124; display: flex; flex-direction: column; background: radial-gradient(120% 80% at 50% 20%, #1c1c1a 0%, #131313 60%, #0f0f0f 100%); padding: max(16px, env(safe-area-inset-top)) 20px max(16px, env(safe-area-inset-bottom)); animation: viewIn 0.4s var(--spring) both; }
.misionar[hidden] { display: none; }
body.mis-open { overflow: hidden; }
body.mis-open .chat-fab, body.mis-open .bottom-nav { display: none; }
.mis-head, .mis-body, .mis-foot, .mis-bar { max-width: 620px; width: 100%; margin: 0 auto; }
.mis-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mis-bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; margin: 12px auto; }
.mis-bar i { display: block; height: 100%; background: var(--lime); transform-origin: left; transform: scaleX(0); transition: transform 0.5s var(--spring); }
.mis-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 2px 16px; overscroll-behavior: contain; }
.mis-titulo { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 4.4vw, 30px); line-height: 1.15; margin-bottom: 10px; }
.mis-ayuda { font-size: 13px; color: var(--text3); line-height: 1.55; margin-bottom: 14px; }
.mis-texto { font-size: 15px; line-height: 1.65; color: var(--text2); }
.mis-search { border: 1px solid var(--border2); border-radius: 12px; margin-bottom: 12px; }
.mis-count { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text3); margin-bottom: 10px; }
.mis-count.ok { color: var(--lime); }
.mis-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.mis-chip { min-height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border2); background: rgba(255,255,255,0.03); color: var(--text2); font-size: 13px; cursor: pointer; transition: all 0.18s var(--spring); }
.mis-chip:hover { color: var(--paper); border-color: rgba(200,255,0,0.4); }
.mis-chip.on { background: var(--lime); border-color: var(--lime); color: var(--ink); font-weight: 600; }
.mis-resumen { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.mis-val { border-left: 2px solid var(--lime); padding-left: 12px; }
.mis-val b { font-size: 15px; }
.mis-val span { display: block; font-size: 13px; color: var(--text2); margin-top: 3px; line-height: 1.5; }
.mis-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.mis-foot .btn { min-height: 46px; padding: 0 22px; }
.mis-pasolbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); }

/* ═══ RESPIRACIÓN CONSCIENTE ═══ */
.respar { position: fixed; inset: 0; z-index: 125; overflow-y: auto; padding: max(16px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); background: radial-gradient(120% 80% at 50% 25%, #1b1c1a 0%, #131313 60%, #0f0f0f 100%); animation: viewIn 0.4s var(--spring) both; }
.respar[hidden] { display: none; }
body.resp-open { overflow: hidden; }
body.resp-open .chat-fab, body.resp-open .bottom-nav { display: none; }
.resp-head, .resp-stage, .resp-config { max-width: 560px; margin: 0 auto; width: 100%; }
.resp-head { display: flex; justify-content: space-between; align-items: flex-start; }
.resp-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 18px 0 8px; }
.resp-orb-wrap { position: relative; width: min(46vw, 168px); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.resp-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(200,255,0,0.18); }
.resp-orb { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #F7F5F0 0%, #D9FF66 22%, #C8FF00 48%, #7FA300 100%); box-shadow: 0 26px 60px -26px rgba(200,255,0,0.4); transform: scale(0.45); transition: transform 0.12s linear; }
.respar[data-state="idle"] .resp-orb { transform: scale(0.62); transition: transform 0.6s var(--spring); }
/* El texto vive acá abajo, nunca adentro del orbe */
.resp-guia { text-align: center; min-height: 104px; display: flex; flex-direction: column; gap: 4px; justify-content: flex-start; }
.resp-fase { font-family: var(--serif); font-size: clamp(24px, 6vw, 32px); line-height: 1.1; }
.resp-cue { font-size: 14px; color: var(--text2); max-width: 32ch; margin: 0 auto; line-height: 1.5; }
.resp-count { font-family: var(--mono); font-size: 30px; color: var(--lime); line-height: 1.1; min-height: 34px; font-variant-numeric: tabular-nums; }
.resp-ciclo { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); }
.resp-bar { width: min(100%, 320px); height: 3px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.resp-bar i { display: block; height: 100%; background: var(--lime); transform-origin: left; transform: scaleX(0); }
.resp-actions { display: flex; gap: 10px; align-items: center; }
.resp-actions .btn { min-height: 46px; padding: 0 26px; }
.respar[data-state="idle"] .resp-stop, .respar[data-state="idle"] .resp-done,
.respar[data-state="run"] .resp-start, .respar[data-state="run"] .resp-done,
.respar[data-state="done"] .resp-start, .respar[data-state="done"] .resp-stop { display: none; }
.resp-done { display: flex; gap: 10px; }
.resp-config { padding-top: 14px; border-top: 1px solid var(--border); margin-top: 8px; }
.resp-resumen { font-size: 13px; color: var(--text2); line-height: 1.55; margin: 10px 0 0; }
.resp-slider { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.resp-slider span { font-size: 12.5px; color: var(--text2); width: 104px; flex-shrink: 0; }
.resp-slider b { font-family: var(--mono); font-size: 11.5px; color: var(--lime); width: 40px; text-align: right; }
.resp-details { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 12px; }
.resp-details summary { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text3); cursor: pointer; }
.resp-details .md { font-size: 13px; line-height: 1.6; color: var(--text2); margin-top: 10px; }
.resp-warn { border: 1px solid rgba(255,77,0,0.35); background: rgba(255,77,0,0.07); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.resp-ok { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--text); margin-top: 8px; cursor: pointer; line-height: 1.45; }
.resp-ok input { accent-color: var(--lime); margin-top: 2px; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) { .resp-orb { transition: none !important; } }

/* ═══ HISTORIAL ═══ */
#logModal { z-index: 130; }
body.jv-open .overlay.open { z-index: 126; }
body.jv-open #logModal.open { z-index: 130; }
body.jv-open #confirmSheet.open { z-index: 150; }
.ref-chip { display: inline; padding: 1px 7px; margin: 0 1px; -webkit-box-decoration-break: clone; box-decoration-break: clone; border-radius: 7px; background: rgba(200,255,0,0.1); border: 1px solid rgba(200,255,0,0.28); color: var(--lime); font-size: 0.92em; font-weight: 500; text-decoration: none; vertical-align: baseline; line-height: 1.45; white-space: normal; }
.ref-chip::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 5px 0 0; border-radius: 50%; background: currentColor; vertical-align: 0.12em; }
a.ref-chip:hover { background: rgba(200,255,0,0.18); }
.ref-chip.ref-objetivo { background: rgba(166,125,216,0.13); border-color: rgba(166,125,216,0.35); color: #C7A9EC; }
.ref-chip.ref-recordatorio, .ref-chip.ref-contacto { background: rgba(255,255,255,0.06); border-color: var(--border2); color: var(--text); }
.ref-chip.done { text-decoration: line-through; opacity: 0.75; }
.ref-chip.gone { background: none; border-style: dashed; border-color: var(--border2); color: var(--text3); }
.jv-msg.user .ref-chip { color: var(--ink); border-color: rgba(20,20,20,0.25); background: rgba(20,20,20,0.06); }
.md p + ul, .md p + ol { margin-top: 0.1em; }
.md-label { margin: 0.7em 0 0.2em; font-family: var(--mono); font-size: 0.7em; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); }
.md-label:first-child { margin-top: 0; }
.jv-msg.user .md-label { color: rgba(20,20,20,0.55); }
.md ul { list-style: none; margin-left: 0; }
.md ul li { position: relative; padding-left: 14px; }
.md ul li::before { content: ''; position: absolute; left: 1px; top: 0.72em; width: 5px; height: 1.5px; background: var(--lime); }
.tool-card-body.md { white-space: normal; }
.log-modal { max-width: 660px; }
.log-days { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; }
.log-days .col-move-btn { flex-shrink: 0; }
.log-conv { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; background: rgba(255,255,255,0.02); }
.log-conv summary { list-style: none; padding: 12px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.log-conv summary::-webkit-details-marker { display: none; }
.log-meta { font-family: var(--mono); font-size: 10.5px; color: var(--text3); }
.log-entries { padding: 2px 14px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; }
.log-who { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); margin-bottom: 3px; }
.log-time { opacity: 0.7; margin-left: 6px; }
.log-txt { font-size: 13.5px; line-height: 1.55; }
.log-e.user .log-txt { color: var(--paper); }
.log-e.ai .log-txt { color: var(--text2); }
.log-e.accion { border-left: 2px solid var(--lime); padding-left: 10px; white-space: pre-wrap; }
.log-e.accion.rechazada { border-left-color: var(--red); }
.log-e.accion.aceptada .log-who { color: var(--lime); }
.log-e.accion.rechazada .log-who { color: var(--red2); }
.log-res { font-family: var(--mono); font-size: 11px; color: var(--text3); margin-top: 3px; word-break: break-word; }
.jv-orb { position: relative; width: min(56vw, 230px); aspect-ratio: 1; border-radius: 50%; border: none; background: transparent; cursor: pointer; flex-shrink: 0; -webkit-tap-highlight-color: transparent; }
.jv-core { position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F7F5F0 0%, #D9FF66 20%, #C8FF00 45%, #7FA300 100%); box-shadow: 0 30px 70px -24px rgba(200,255,0,0.35), inset 0 -10px 30px rgba(20,20,20,0.25); animation: jvBreath 4.5s ease-in-out infinite; transition: transform 0.5s var(--spring), filter 0.5s; }
.jv-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(200,255,0,0.3); opacity: 0; }
.jarvis[data-state="idle"] .jv-ring.r1 { opacity: 0.45; inset: 12%; }
.jarvis[data-state="listening"] .jv-ring { animation: jvRipple 2.4s var(--spring) infinite; }
.jarvis[data-state="listening"] .jv-ring.r2 { animation-delay: 0.8s; }
.jarvis[data-state="listening"] .jv-ring.r3 { animation-delay: 1.6s; }
.jarvis[data-state="listening"] .jv-core { transform: scale(1.06); animation: none; }
.jarvis[data-state="thinking"] .jv-ring.r1 { opacity: 1; inset: 10%; border: 2px solid transparent; border-top-color: var(--lime); border-right-color: rgba(200,255,0,0.25); animation: spin 1.1s linear infinite; }
.jarvis[data-state="thinking"] .jv-core { transform: scale(0.9); filter: saturate(0.55) brightness(0.85); animation: none; }
.jarvis[data-state="speaking"] .jv-core { animation: jvTalk 0.55s ease-in-out infinite alternate; }
.jarvis[data-state="confirm"] .jv-core { filter: hue-rotate(185deg) saturate(0.7); animation: jvBreath 1.6s ease-in-out infinite; }
.jarvis[data-state="confirm"] .jv-ring.r1 { opacity: 0.8; inset: 12%; border-color: var(--violet); }
.jv-wave { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.jarvis[data-state="speaking"] .jv-wave { opacity: 1; }
.jv-wave i { width: 5px; height: 26%; border-radius: 4px; background: var(--ink); animation: bar 0.8s ease-in-out infinite; }
.jv-wave i:nth-child(2) { animation-delay: 0.12s; } .jv-wave i:nth-child(3) { animation-delay: 0.24s; height: 34%; } .jv-wave i:nth-child(4) { animation-delay: 0.36s; } .jv-wave i:nth-child(5) { animation-delay: 0.48s; }
@keyframes jvBreath { 50% { transform: scale(1.035); } }
@keyframes jvRipple { 0% { transform: scale(0.62); opacity: 0.85; } 100% { transform: scale(1.28); opacity: 0; } }
@keyframes jvTalk { from { transform: scale(0.97); } to { transform: scale(1.08); } }
.jv-state { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); }
.jv-actions:empty { display: none; }
.jv-card { white-space: pre-wrap; text-align: left; font-size: 13px; line-height: 1.55; color: var(--text2); background: rgba(255,255,255,0.04); border: 1px solid rgba(200,255,0,0.3); border-radius: 14px; padding: 12px 14px; max-width: 420px; margin: 0 auto 10px; }
.jv-btns { display: flex; gap: 10px; justify-content: center; }
.jv-btns .btn { min-height: 46px; padding: 0 22px; }
.jv-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.jv-chips button { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border2); background: rgba(255,255,255,0.04); color: var(--text2); font-size: 12.5px; cursor: pointer; transition: all var(--t); }
.jv-chips button:hover { color: var(--paper); border-color: rgba(200,255,0,0.45); }
.jv-input-row { display: flex; gap: 8px; }
.jv-input-row input { flex: 1; min-width: 0; height: 48px; background: rgba(255,255,255,0.05); border: 1px solid var(--border2); border-radius: 14px; padding: 0 14px; color: var(--text); font-size: 15px; outline: none; }
.jv-input-row input:focus { border-color: rgba(200,255,0,0.6); }
.jv-input-row .chat-send { width: 48px; border-radius: 14px; }

/* ═══ SELECTOR CON BÚSQUEDA ═══ */
.pk-native { display: none !important; }
.pk-btn { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--border2); border-radius: 10px; padding: 10px 12px; color: var(--text); font-size: 13.5px; text-align: left; cursor: pointer; transition: background var(--t), border-color var(--t); }
.pk-btn:hover { background: rgba(255,255,255,0.07); }
.pk-btn:focus-visible { border-color: rgba(200,255,0,0.6); box-shadow: 0 0 0 3px rgba(200,255,0,0.1); outline: none; }
.pk-btn.is-empty .pk-val { color: var(--text3); }
.pk-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-chev { width: 16px; height: 16px; color: var(--text3); }
.pk-backdrop { position: fixed; inset: 0; z-index: 170; }
.pk-panel { position: fixed; z-index: 171; display: flex; flex-direction: column; max-height: min(400px, 62dvh); background: var(--glass-fill), rgba(30,30,30,0.97); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); border: 1px solid var(--border2); border-radius: 14px; box-shadow: 0 30px 70px -20px rgba(0,0,0,0.9); overflow: hidden; animation: modalIn 0.35s var(--spring) both; }
.pk-panel.sheet { left: 12px; right: 12px; top: max(16px, env(safe-area-inset-top)); max-height: 64dvh; }
@media (max-width: 768px) { .pk-backdrop { background: rgba(10,10,10,0.45); animation: viewIn 0.3s var(--spring) both; } }
.pk-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.pk-search .ic { width: 16px; height: 16px; color: var(--text3); }
.pk-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-size: 15px; }
.pk-list { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.pk-group { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); padding: 12px 10px 5px; }
.pk-group span { color: var(--lime); letter-spacing: 0.04em; text-transform: none; margin-left: 4px; }
.pk-opt { padding: 9px 10px; border-radius: 9px; cursor: pointer; min-height: 40px; }
.pk-opt:hover, .pk-opt.active { background: rgba(255,255,255,0.07); }
.pk-opt.sel .pk-main { color: var(--lime); }
.pk-main { font-size: 13.5px; line-height: 1.35; }
.pk-sub { font-family: var(--mono); font-size: 10.5px; color: var(--text3); margin-top: 2px; }
.pk-more, .pk-empty { font-size: 11.5px; color: var(--text3); padding: 6px 10px 8px; }

/* ═══ SCROLLBAR ═══ */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.14) transparent; }

/* ═══ RESPONSIVE ═══ */
.bottom-nav { display: none; }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.5s var(--spring); box-shadow: 30px 0 60px -20px rgba(0,0,0,0.8); }
  .sidebar.open { transform: translateX(0); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(10,10,10,0.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity 0.4s var(--spring); }
  .sidebar.open + .scrim { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .hamb { display: inline-flex; }
  .dash-grid, .dash-grid-3, .brief-grid, .diario-grid, .field-row, .kanban-board, .jv-row, #view-reportes .dash-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .dash-grid-3 #agendaCard { grid-column: auto; }
  .card-header { flex-wrap: wrap; }
  .content { padding: 20px 16px 150px; }
  .topbar { padding: 0 16px; height: 60px; }
  .topbar-left { gap: 8px; min-width: 0; flex: 1; align-items: center; }
  .page-title { font-size: 20px; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .page-date, .topbar-right .tbtn { display: none; }
  .topbar-right { flex-shrink: 0; padding-left: 10px; }
  .topbar-right .tbtn.jv-launch { display: inline-flex; padding: 0 11px; }
  .jv-launch .lbl { display: none; }
  .quote-card { padding: 24px 22px 18px; }
  .view-head { align-items: flex-start; }
  .bottom-nav { display: flex; position: fixed; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); border-radius: 18px; z-index: 50; padding: 6px; background: var(--glass-fill), rgba(26,26,26,0.72); }
  .bnav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; border-radius: 12px; cursor: pointer; color: var(--text3); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; transition: color var(--t), background var(--t); }
  .bnav-item.active { color: var(--ink); background: var(--lime); }
  .bnav-icon { display: none; }
  .chat-panel { width: auto; left: 12px; right: 12px; bottom: 150px; height: min(520px, calc(100dvh - 180px)); }
  .chat-fab { bottom: 84px; right: 16px; height: 46px; }
  .chat-fab .fab-label { display: none; }
  .chat-fab { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .orb { display: none; }
}

/* ═══ SISTEMAS (hábitos) ═══ */
.hab-lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); margin-bottom: 6px; }
.hab-alerta { color: var(--yellow2); }
.hab-valor { font-weight: 400; font-size: 11px; color: var(--text3); }
.hab-lb { display: flex; align-items: center; gap: 10px; }
.hab-lb.pausado { opacity: 0.55; }

/* ═══ LOGIN Y GRUPO DE TESTING ═══ */
.lg-google { display: flex; justify-content: center; min-height: 44px; }
.lg-magic { margin-top: 14px; }
.lg-google[hidden], .lg-magic[hidden] { display: none; }
.lg-magic input { flex: 1; min-width: 0; }
.lg-or { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; font-size: 11.5px; color: var(--text3); }
.lg-or::before, .lg-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.lg-pass { text-align: left; border-top: 1px solid var(--border); padding-top: 12px; }
.lg-pass summary { cursor: pointer; font-size: 12.5px; color: var(--text2); }
.inv-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.inv-row b { display: block; font-size: 13px; }
.inv-row span { font-size: 11.5px; color: var(--text3); }
.inv-env { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.inv-add { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) auto; gap: 6px; margin: 10px 0 6px; }
@media (max-width: 520px) { .inv-add { grid-template-columns: 1fr; } }
[data-owner][hidden] { display: none !important; }
.lg-legal { margin-top: 16px; font-size: 11px; color: var(--text3); line-height: 1.5; }
.lg-legal a { color: var(--text2); }
.inv-modo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inv-cupo { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12px; color: var(--text3); text-transform: none; letter-spacing: 0; }
.inv-cupo input { width: 70px; padding: 6px 8px; }
.inv-row.bloq { opacity: 0.55; }
.inv-row .tbtn { flex: none; }

/* ═══ CAMINO: chispas, nivel, primeros pasos ═══ */
.camino-card { margin-bottom: 16px; }
.camino-card.compacta { padding-top: 12px; padding-bottom: 12px; }
.camino-card:empty { display: none; }
.cam-nivel { display: flex; align-items: center; gap: 12px; }
.cam-badge { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 20px; color: var(--ink); background: radial-gradient(circle at 35% 30%, #e6ff80, var(--lime) 55%, #8fb300); box-shadow: 0 0 20px rgba(200,255,0,0.3); }
.cam-nombre { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.cam-nombre span { font-family: var(--mono); font-size: 10.5px; font-weight: 400; color: var(--lime); letter-spacing: 0.04em; }
.cam-bar { height: 5px; border-radius: 5px; background: rgba(255,255,255,0.08); overflow: hidden; margin: 6px 0 4px; }
.cam-bar i { display: block; height: 100%; background: var(--lime); transform-origin: left; transition: transform 0.8s var(--spring); }
.cam-sig { font-size: 11px; color: var(--text3); }
.cam-pasos { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.cam-paso { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,0.02); color: var(--text2); font-size: 13.5px; cursor: pointer; transition: all var(--t); }
.cam-paso:hover { border-color: rgba(200,255,0,0.4); color: var(--paper); }
.cam-paso.prox { border-color: rgba(200,255,0,0.45); background: rgba(200,255,0,0.06); color: var(--paper); }
.cam-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--text3); }
.cam-paso.prox .cam-dot { border-color: var(--lime); background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.cam-txt { flex: 1; min-width: 0; }
.cam-premio { font-family: var(--mono); font-size: 10.5px; color: var(--lime); }
.chispa-flota { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 400; padding: 8px 16px; border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 700; font-size: 14px; pointer-events: none; animation: chispaSube 1.8s var(--spring) forwards; box-shadow: 0 8px 30px rgba(200,255,0,0.35); }
@keyframes chispaSube { 0% { opacity: 0; transform: translate(-50%, 20px) scale(0.8); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 70% { opacity: 1; transform: translate(-50%, -14px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -40px) scale(0.95); } }
.nav-item.locked, .bnav-item.locked { opacity: 0.4; }
.nav-item.locked::after { content: ''; width: 10px; height: 10px; margin-left: auto; 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='2.4'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%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='2.4'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center/contain no-repeat; }
.pulse-once { animation: pulseOnce 1.5s ease; border-radius: 14px; }
@keyframes pulseOnce { 0%, 100% { box-shadow: 0 0 0 0 rgba(200,255,0,0); } 40% { box-shadow: 0 0 0 6px rgba(200,255,0,0.35); } }
.mis-rueda { margin-bottom: 14px; }
.mis-rueda-h { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.mis-rueda-h b { font-family: var(--mono); color: var(--lime); }
.mis-rueda input[type=range] { width: 100%; accent-color: var(--lime); }

/* ═══ BIENVENIDA ═══ */
.bienvenida { position: fixed; inset: 0; z-index: 128; display: flex; flex-direction: column; overflow-y: auto; padding: max(16px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); background: radial-gradient(120% 80% at 50% 15%, #1d2012 0%, #141414 55%, #0f0f0f 100%); animation: viewIn 0.4s var(--spring) both; }
.bienvenida[hidden] { display: none; }
body.bv-open { overflow: hidden; }
body.bv-open .chat-fab, body.bv-open .bottom-nav { display: none; }
.bv-head, .bv-body { max-width: 520px; width: 100%; margin: 0 auto; }
.bv-head { display: flex; justify-content: space-between; align-items: center; min-height: 36px; }
.bv-dots { display: flex; gap: 6px; }
.bv-dots i { width: 22px; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.12); transition: background var(--t); }
.bv-dots i.on { background: var(--lime); }
.bv-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
.bv-eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); margin-bottom: 10px; }
.bv-titulo { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 7vw, 40px); line-height: 1.1; margin: 0 0 14px; }
.bv-texto { font-size: 15.5px; line-height: 1.6; color: var(--text2); margin: 0 0 12px; }
.bv-texto b { color: var(--paper); }
.bv-cta { width: 100%; justify-content: center; min-height: 50px; margin-top: 22px; font-size: 15px; }
.bv-body .mis-chips { margin-top: 8px; }
.bv-sem { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.bv-sem button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left; padding: 16px; border-radius: 16px; border: 1px solid var(--border2); background: rgba(255,255,255,0.03); color: var(--paper); cursor: pointer; transition: all var(--t); }
.bv-sem button:hover { border-color: rgba(200,255,0,0.4); transform: translateY(-1px); }
.bv-sem b { font-size: 15px; }
.bv-sem small { grid-column: 2; font-size: 12px; color: var(--text3); }
.bv-luz { grid-row: span 2; width: 18px; height: 18px; border-radius: 50%; }
.bv-luz.verde { background: #4ade80; box-shadow: 0 0 14px #4ade80; }
.bv-luz.amarillo { background: #facc15; box-shadow: 0 0 14px #facc15; }
.bv-luz.rojo { background: #f87171; box-shadow: 0 0 14px #f87171; }
.bv-premio { align-self: flex-start; display: flex; align-items: baseline; gap: 6px; padding: 8px 16px; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: 13px; font-weight: 600; margin-bottom: 18px; animation: chispaPop 0.7s var(--spring) both; }
.bv-premio span { font-family: var(--serif); font-size: 26px; }
@keyframes chispaPop { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.bv-mision { border: 1px solid rgba(200,255,0,0.35); background: rgba(200,255,0,0.05); border-radius: 16px; padding: 14px 16px; margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.bv-mision-lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
.bv-mision b { font-size: 16px; }
.bv-mision span { font-size: 13px; color: var(--text2); line-height: 1.5; }
.bv-body .link-btn { align-self: center; margin-top: 12px; }

/* ═══ CARTEL DE ESPACIO (Órbita / Taller) ═══ */
.espacio-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(200,255,0,0.35); background: rgba(200,255,0,0.07); font-size: 13px; color: var(--text2); }
.espacio-banner[hidden] { display: none; }
.espacio-banner span { flex: 1; min-width: 200px; }
.espacio-banner .tbtn { flex: none; height: 30px; font-size: 11.5px; }
.crisis b { color: var(--paper); }

.version-pie { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--text3); cursor: pointer; }
.version-pie:hover { color: var(--text2); }
