/* LOGWORK AI: usa los colores y la tipografía de styles.css. Movimiento solo de entrada y como respuesta a lo que hace la persona. */
:root { --lw-amarillo: #ffd43b; --lw-amarillo-osc: #8a6a00; --lw-rapido: 0.18s; --lw-medio: 0.45s; }

/* ---------- Encabezado ---------- */
.lw-hero { display: flex; flex-direction: column; }
.lw-volver { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 0.78rem; font-weight: 600; text-decoration: none; transition: background var(--lw-rapido); }
.lw-volver:hover { background: rgba(255, 255, 255, 0.2); }
.lw-volver i { transition: transform var(--lw-rapido) var(--ease); }
.lw-volver:hover i { transform: translateX(-3px); }
.lw-intro { max-width: 62ch; margin-top: 16px; font-size: 0.95rem; line-height: 1.55; color: rgba(255, 255, 255, 0.86); opacity: 0; animation: lw-entra 0.7s 0.55s var(--ease) forwards; }

.lw-main { display: grid; grid-template-columns: minmax(0, 390px) minmax(0, 1fr); gap: 22px; align-items: start; padding-block: 26px 56px; }
@media (max-width: 900px) { .lw-main { grid-template-columns: minmax(0, 1fr); } }
.lw-h2 { font-size: 1.05rem; font-weight: 800; color: var(--c-principal); }

@keyframes lw-entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Formulario ---------- */
.lw-form { position: sticky; top: 16px; display: flex; flex-direction: column; animation: lw-entra 0.6s 0.25s var(--ease) both; }
@media (max-width: 900px) { .lw-form { position: static; } }
.lw-form > .lw-h2 { margin-bottom: 4px; }
.lw-paso { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.lw-label { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 0.82rem; font-weight: 700; color: var(--c-texto); }
.lw-label small { font-weight: 500; color: var(--c-muted); }
.lw-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--c-borde); font-size: 0.7rem; font-weight: 800; color: var(--c-muted); transition: background var(--lw-medio) var(--ease), border-color var(--lw-medio), color var(--lw-medio), transform var(--lw-medio) var(--ease); }
.lw-paso.hecho .lw-num { border-color: var(--c-accion); background: var(--c-accion); color: var(--c-principal); transform: scale(1.06); }

.lw-select { position: relative; }
.lw-select::after { content: ''; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--c-secundario); border-bottom: 2px solid var(--c-secundario); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
#lw-depto { width: 100%; appearance: none; padding: 12px 38px 12px 13px; border: 1.5px solid var(--c-borde); border-radius: 12px; background: var(--c-fondo); color: var(--c-texto); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: border-color var(--lw-rapido), box-shadow var(--lw-rapido); }
#lw-depto:hover { border-color: var(--c-secundario); }
#lw-depto:focus { border-color: var(--c-secundario); outline: none; box-shadow: 0 0 0 3px rgba(3, 227, 92, 0.25); }

.lw-opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.lw-op { position: relative; display: inline-flex; align-items: center; padding: 8px 14px; border: 1.5px solid var(--c-borde); border-radius: 999px; background: var(--c-fondo); color: var(--c-texto); font-size: 0.8rem; font-weight: 600; cursor: pointer; user-select: none; transition: border-color var(--lw-rapido), background var(--lw-rapido), color var(--lw-rapido), transform var(--lw-rapido) var(--ease); }
.lw-op input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lw-op:hover { border-color: var(--c-secundario); }
.lw-op:active { transform: scale(0.95); }
.lw-op:has(input:checked) { border-color: var(--c-principal); background: var(--c-principal); color: #fff; animation: lw-marca 0.32s var(--ease); }
.lw-op:has(input:focus-visible) { outline: 3px solid var(--c-accion); outline-offset: 2px; }
@keyframes lw-marca { 40% { transform: scale(1.07); } }

.lw-archivo { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed #b9cdc5; border-radius: 14px; background: var(--c-superficie); color: var(--c-secundario); cursor: pointer; transition: border-color var(--lw-rapido), background var(--lw-rapido), transform var(--lw-rapido) var(--ease); overflow-wrap: anywhere; }
.lw-archivo-ico { font-size: 1.5rem; flex-shrink: 0; transition: transform var(--lw-medio) var(--ease); }
.lw-archivo-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lw-archivo-txt strong { font-size: 0.84rem; font-weight: 700; }
.lw-archivo-txt small { font-size: 0.72rem; color: var(--c-muted); }
.lw-archivo:hover { border-color: var(--c-secundario); }
.lw-archivo:hover .lw-archivo-ico { transform: translateY(-2px); }
.lw-archivo.arrastrando { border-color: var(--c-accion); background: var(--c-pos-bg); transform: scale(1.015); }
.lw-archivo.arrastrando .lw-archivo-ico { transform: translateY(-4px) scale(1.1); }
.lw-archivo.cargando { cursor: progress; }
.lw-archivo.cargando .lw-archivo-ico { animation: lw-pulso 1s ease-in-out infinite; }
.lw-archivo.listo { border-style: solid; border-color: var(--c-accion); background: var(--c-pos-bg); color: var(--c-pos); }
.lw-archivo.listo .lw-archivo-ico { animation: lw-marca 0.4s var(--ease); }
.lw-archivo:focus-within { outline: 3px solid var(--c-accion); outline-offset: 2px; }
@keyframes lw-pulso { 50% { opacity: 0.4; } }
.lw-quitar { align-self: flex-start; margin-top: 7px; padding: 0; border: 0; background: none; color: var(--c-muted); font: inherit; font-size: 0.74rem; font-weight: 600; text-decoration: underline; cursor: pointer; }
.lw-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--c-superficie); font-size: 0.74rem; line-height: 1.45; color: var(--c-muted); cursor: pointer; animation: lw-entra 0.35s var(--ease); }
.lw-consent input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--c-principal); flex-shrink: 0; }

.lw-error { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--c-neg-bg); color: var(--c-neg); font-size: 0.8rem; font-weight: 600; animation: lw-sacude 0.4s; }
@keyframes lw-sacude { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

.lw-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; padding: 14px 18px; border: 0; border-radius: 12px; background: var(--c-accion); color: var(--c-principal); font: inherit; font-size: 0.94rem; font-weight: 800; cursor: pointer; transition: transform var(--lw-rapido) var(--ease), box-shadow var(--lw-rapido); }
.lw-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(3, 227, 92, 0.35); }
.lw-btn:active { transform: scale(0.98); }
.lw-btn.ocupado { cursor: progress; transform: none; box-shadow: none; }
.lw-btn.ocupado::before { content: ''; width: 16px; height: 16px; border: 2.5px solid rgba(0, 48, 36, 0.25); border-top-color: var(--c-principal); border-radius: 50%; animation: lw-gira 0.8s linear infinite; }
@keyframes lw-gira { to { transform: rotate(360deg); } }

/* ---------- Resultados ---------- */
.lw-resultados { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lw-vacio { padding: clamp(20px, 3vw, 30px); border: 1.5px dashed var(--c-borde); border-radius: var(--radio); animation: lw-entra 0.6s 0.4s var(--ease) both; }
.lw-vacio-tit { font-size: 0.95rem; font-weight: 800; color: var(--c-principal); }
.lw-como { counter-reset: paso; display: grid; gap: 14px; margin-top: 16px; padding: 0; list-style: none; }
.lw-como li { counter-increment: paso; position: relative; padding-left: 44px; font-size: 0.86rem; line-height: 1.5; color: var(--c-muted); }
.lw-como li b { display: block; color: var(--c-texto); }
.lw-como li::before { content: counter(paso); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--c-superficie); color: var(--c-secundario); font-weight: 800; }

.lw-barra-busqueda { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 16px; border-radius: 14px; background: var(--c-principal); color: #fff; animation: lw-entra 0.4s var(--ease); }
.lw-barra-busqueda p { font-size: 0.86rem; font-weight: 700; }
.lw-barra-busqueda p span { font-weight: 500; opacity: 0.75; }
.lw-cambiar { padding: 6px 12px; border: 1.5px solid rgba(255, 255, 255, 0.3); border-radius: 999px; background: none; color: #fff; font: inherit; font-size: 0.74rem; font-weight: 700; cursor: pointer; transition: background var(--lw-rapido); }
.lw-cambiar:hover { background: rgba(255, 255, 255, 0.12); }

/* Progreso de la búsqueda */
.lw-progreso { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 18px; padding: 0; list-style: none; }
.lw-progreso li { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; color: var(--c-muted); transition: color var(--lw-medio); }
.lw-progreso li::before { content: ''; width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--c-borde); box-sizing: border-box; transition: border-color var(--lw-medio), background var(--lw-medio); }
.lw-progreso li.activo { color: var(--c-texto); font-weight: 700; }
.lw-progreso li.activo::before { border-color: var(--c-accion); border-top-color: transparent; animation: lw-gira 0.8s linear infinite; }
.lw-progreso li.hecho { color: var(--c-pos); }
.lw-progreso li.hecho::before { border-color: var(--c-accion); background: var(--c-accion) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23003024' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }

.lw-esqueleto { padding: 16px 0; border-top: 1px solid var(--c-borde); }
.lw-esqueleto span { display: block; height: 12px; margin-top: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--c-superficie) 0%, #e6efeb 50%, var(--c-superficie) 100%); background-size: 200% 100%; animation: lw-brillo 1.3s ease-in-out infinite; }
.lw-esqueleto span:nth-child(1) { width: 62%; height: 15px; margin-top: 0; }
.lw-esqueleto span:nth-child(2) { width: 38%; }
.lw-esqueleto span:nth-child(3) { width: 84%; }
@keyframes lw-brillo { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Vacantes */
.lw-lista-cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.lw-cuenta { font-size: 0.78rem; font-weight: 700; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.lw-vac-lista { display: flex; flex-direction: column; margin-top: 6px; }
.lw-vac { position: relative; padding: 16px 0 16px; border-bottom: 1px solid var(--c-borde); opacity: 0; animation: lw-entra 0.5s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms); }
.lw-vac:last-child { border-bottom: 0; }
.lw-vac-cab { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 14px; }
.lw-vac-tit { flex: 1 1 260px; min-width: 0; font-size: 1rem; font-weight: 800; line-height: 1.35; }
.lw-vac-tit a { color: var(--c-principal); text-decoration: none; background: linear-gradient(var(--c-accion), var(--c-accion)) 0 100% / 0 2px no-repeat; transition: background-size var(--lw-medio) var(--ease); }
.lw-vac-tit a:hover { background-size: 100% 2px; }
.lw-vac-emp { margin-top: 4px; font-size: 0.82rem; font-weight: 600; color: var(--c-secundario); }
.lw-vac-datos { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 0.74rem; color: var(--c-muted); }
.lw-vac-datos .fresca { color: var(--c-pos); font-weight: 700; }
.lw-vac-porque, .lw-vac-falta { position: relative; margin-top: 8px; padding-left: 20px; font-size: 0.84rem; line-height: 1.45; }
.lw-vac-porque::before { content: '+'; position: absolute; left: 4px; font-weight: 800; color: var(--c-pos); }
.lw-vac-falta { margin-top: 4px; color: var(--c-muted); }
.lw-vac-falta::before { content: '→'; position: absolute; left: 2px; font-weight: 800; color: var(--lw-amarillo-osc); }
.lw-vac-res { margin-top: 8px; font-size: 0.82rem; line-height: 1.45; color: var(--c-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lw-vac-ir { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border-radius: 10px; background: var(--c-principal); color: #fff; font-size: 0.78rem; font-weight: 700; text-decoration: none; transition: background var(--lw-rapido), gap var(--lw-rapido) var(--ease); }
.lw-vac-ir::after { content: '↗'; font-weight: 800; }
.lw-vac-ir:hover { background: var(--c-secundario); gap: 11px; }

/* Medidor de afinidad: lo memorable de la página */
.lw-medidor { flex: 0 0 132px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.lw-medidor b { font-size: 1.25rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--c-principal); }
.lw-medidor b small { font-size: 0.7rem; font-weight: 700; margin-left: 2px; color: var(--c-muted); }
.lw-medidor-barra { width: 100%; height: 6px; border-radius: 6px; background: var(--c-superficie); overflow: hidden; }
.lw-medidor-barra i { display: block; height: 100%; width: var(--a, 0%); border-radius: 6px; background: var(--c-accion); transform-origin: left; animation: lw-llena 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 200ms); }
.lw-medidor.media .lw-medidor-barra i { background: var(--lw-amarillo); }
.lw-medidor.baja .lw-medidor-barra i { background: #b9cdc5; }
.lw-medidor span { font-size: 0.68rem; font-weight: 700; color: var(--c-muted); }
@keyframes lw-llena { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 520px) { .lw-medidor { flex-basis: 100%; align-items: flex-start; } .lw-medidor-barra { max-width: 220px; } }

.lw-aviso-caja { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fff4d6; color: #6b4a00; font-size: 0.8rem; font-weight: 600; }
.lw-aviso { margin-top: 14px; font-size: 0.72rem; color: var(--c-muted); }

/* Lectura del CV */
.lw-cv { border-color: #b9e8cb; animation: lw-entra 0.5s var(--ease); }
.lw-resumen { margin-top: 10px; font-size: 0.92rem; line-height: 1.55; color: var(--c-texto); max-width: 70ch; }
.lw-nota-nivel { margin-top: 10px; padding: 9px 12px; border-left: 3px solid var(--c-accion); background: var(--c-superficie); font-size: 0.82rem; font-weight: 600; color: var(--c-secundario); }
.lw-bloque { margin-top: 16px; }
.lw-bloque h3 { margin-bottom: 8px; font-size: 0.8rem; font-weight: 800; color: var(--c-principal); }
.lw-bloque ul { display: flex; flex-direction: column; gap: 7px; padding: 0; list-style: none; }
.lw-bloque li { position: relative; padding-left: 20px; font-size: 0.84rem; line-height: 1.45; }
.lw-bloque.reforzar li::before { content: '→'; position: absolute; left: 2px; font-weight: 800; color: var(--lw-amarillo-osc); }
.lw-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.lw-chips span { padding: 5px 11px; border-radius: 999px; background: var(--c-superficie); border: 1px solid var(--c-borde); font-size: 0.76rem; font-weight: 600; color: var(--c-secundario); }

/* Portales */
.lw-extra { animation: lw-entra 0.5s var(--ease); }
.lw-fila { padding: 14px 0; border-bottom: 1px solid var(--c-borde); }
.lw-fila:last-child { border-bottom: 0; }
.lw-fila.sugerida .lw-frase::before { content: 'Sugerido por tu CV'; display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 999px; background: #fff4d6; color: #6b4a00; font-size: 0.66rem; font-weight: 700; vertical-align: 2px; }
.lw-frase { margin-bottom: 10px; font-size: 0.92rem; font-weight: 700; color: var(--c-principal); }
.lw-portales, .lw-portales-estado { display: flex; flex-wrap: wrap; gap: 8px; }
.lw-portales-estado { margin-top: 14px; }
.lw-portal { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1.5px solid var(--c-borde); border-radius: 11px; color: var(--c-principal); font-size: 0.78rem; font-weight: 700; text-decoration: none; transition: border-color var(--lw-rapido), background var(--lw-rapido), transform var(--lw-rapido) var(--ease); }
.lw-portal:hover { border-color: var(--c-secundario); background: var(--c-superficie); transform: translateY(-1px); }
.lw-portal small { font-weight: 500; color: var(--c-muted); }

@media (prefers-reduced-motion: reduce) {
  .lw-intro, .lw-form, .lw-vacio, .lw-vac, .lw-cv, .lw-extra, .lw-barra-busqueda, .lw-consent { animation: none !important; opacity: 1 !important; transform: none !important; }
  .lw-medidor-barra i, .lw-op:has(input:checked), .lw-error, .lw-archivo.listo .lw-archivo-ico { animation: none !important; }
  .lw-esqueleto span { animation: none; }
  .lw-op, .lw-btn, .lw-portal, .lw-archivo, .lw-num { transition: none; }
}
