/* Las tres vistas de la memoria: Contexto, Mapa vivo y Trabajo */
.mem { display: grid; grid-template-columns: 96px minmax(0, 1fr); height: 100dvh; }
.mem > * { min-height: 0; min-width: 0; }
.web .mem { grid-template-columns: minmax(0, 1fr); grid-template-rows: 60px minmax(0, 1fr); }
.web .mem .riel { display: none; }
.mem-cuerpo { display: flex; flex-direction: column; min-height: 0; }
.mem-cab { display: flex; align-items: center; gap: 28px; padding: 0 28px; height: 68px; border-bottom: 1px solid var(--linea); flex: none; }
.mem-cab h1 { font-size: 17px; font-weight: 600; white-space: nowrap; }
.mem-cab h1 span { font-weight: 400; color: var(--texto-2); margin-left: 6px; }
.mem-cab .pestanas { border: 0; gap: 22px; height: 100%; align-items: stretch; }
.mem-cab .pestanas a { display: flex; align-items: center; margin-bottom: 0; font-size: 14px; }
.mem-cab .buscar { margin-left: auto; width: 320px; height: 38px; }
.mem-area { flex: 1; min-height: 0; display: grid; }

/* ---------- Contexto ---------- */
.ctx { grid-template-columns: repeat(3, minmax(0, 1fr)) 360px; }
.ctx-col { border-right: 1px solid var(--linea); overflow: auto; padding: 18px 18px 28px; display: grid; gap: 18px; align-content: start; }
.ctx-col > header { display: flex; justify-content: space-between; align-items: baseline; }
.ctx-col > header h2 { font-size: 16px; font-weight: 600; }
.ctx-col > header span { font-size: 12.5px; color: var(--texto-2); }
.ctx-grupo { display: grid; gap: 6px; }
.ctx-grupo > h3 { font-size: 12px; font-weight: 600; color: var(--texto-3); display: flex; justify-content: space-between; padding: 0 2px 2px; }
.ficha-mini { display: flex; align-items: center; gap: 10px; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 10px; padding: 9px 11px; font-size: 13px; cursor: pointer; }
.claro .ficha-mini { background: #fff; }
.ficha-mini div { min-width: 0; flex: 1; }
.ficha-mini b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha-mini div span { display: block; font-size: 12px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha-mini .lado { flex: none; font-size: 12px; color: var(--texto-3); font-variant-numeric: tabular-nums; }
.ficha-mini.elegida { outline: 2px solid var(--texto); outline-offset: -1px; }
.ficha-mini.ligada { border-color: var(--texto-2); }
.datos-fijos { background: var(--suave); border-radius: 10px; padding: 11px 12px; font-size: 12.5px; display: grid; gap: 5px; }
.datos-fijos div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.datos-fijos div span:first-child { color: var(--texto-3); }

.ficha { background: var(--panel); overflow: auto; padding: 22px 22px 28px; display: grid; gap: 20px; align-content: start; }
.ficha .quien-f { display: flex; gap: 14px; align-items: center; }
.ficha .quien-f .persona-ini { width: 52px; height: 52px; font-size: 16px; }
.ficha .quien-f b { display: block; font-size: 18px; font-weight: 600; }
.ficha .quien-f span { color: var(--texto-2); font-size: 13px; }
.ficha dl { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 13px; }
.ficha dt { color: var(--texto-2); }
.ficha h4 { font-size: 12px; font-weight: 600; color: var(--texto-3); margin-bottom: 8px; }
.ligas { display: grid; }
.liga { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); font-size: 13px; text-decoration: none; color: var(--texto); }
.liga:last-child { border-bottom: 0; }
.liga span { font-size: 12px; color: var(--texto-2); grid-column: 1; }
.liga em { font-style: normal; font-size: 12px; color: var(--texto-2); grid-row: 1 / span 2; grid-column: 2; align-self: center; }

/* ---------- Mapa vivo ---------- */
.mapa { grid-template-columns: minmax(0, 1fr) 330px; }
.procesos { overflow: auto; padding: 22px 30px 30px; display: grid; gap: 18px; align-content: start; }
.proceso { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 14px; padding: 16px 20px 18px; }
.claro .proceso { background: #fff; }
.proceso > header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.proceso > header h3 { font-size: 15px; font-weight: 600; }
.proceso > header .t-chico { margin-left: auto; }
.linea-metro { display: grid; grid-template-columns: 120px repeat(var(--n, 4), minmax(0, 1fr)) 130px; align-items: stretch; position: relative; margin-top: 4px; }
.linea-metro::before { content: ""; position: absolute; left: 60px; right: 65px; top: 50px; height: 3px; background: var(--texto); border-radius: 2px; z-index: 0; }
.punta { position: relative; z-index: 1; display: grid; grid-template-rows: 38px 24px auto; justify-items: center; text-align: center; font-size: 12px; }
.punta .caja-p { grid-row: 2; background: var(--suave); border-radius: 7px; padding: 4px 9px; font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.punta span { grid-row: 3; color: var(--texto-2); font-size: 11.5px; margin-top: 6px; line-height: 1.3; }
.estacion { position: relative; z-index: 1; display: grid; grid-template-rows: 38px 24px auto; justify-items: center; text-align: center; padding: 0 6px; }
.estacion .etiqueta-t { align-self: end; margin-bottom: 4px; font-size: 11px; }
.estacion i { width: 18px; height: 18px; border-radius: 50%; background: var(--tarjeta); border: 3px solid var(--texto); align-self: center; }
.claro .estacion i { background: #fff; }
.estacion b { font-size: 12.5px; font-weight: 600; margin-top: 6px; line-height: 1.3; }
.estacion span { font-size: 11.5px; color: var(--texto-3); line-height: 1.3; }
.estacion.alto i { border-color: var(--senal); background: var(--senal); }
.estacion.alto b { color: var(--senal); }
.estacion.propuesta i { border-style: dashed; border-color: var(--texto-2); }
.estacion.propuesta b, .estacion.propuesta .etiqueta-t { opacity: .75; }
.estacion.encendida .etiqueta-t { background: var(--boton-fondo); color: var(--boton-texto); }
.estacion.encendida i { box-shadow: 0 0 0 5px var(--suave-2); }
.mapa .apagado .estacion:not(.encendida) { opacity: .55; }
.propuesta-aviso { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--linea-2); font-size: 12.5px; color: var(--texto-2); }
.propuesta-aviso .grupo-btn { margin-left: auto; }

.arbol { background: var(--panel); overflow: auto; padding: 22px 22px 28px; }
.arbol h2 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.arbol ul { list-style: none; display: grid; gap: 6px; }
.arbol ul ul { margin: 6px 0 0 14px; padding-left: 14px; border-left: 1px solid var(--linea-2); }
.puesto { display: flex; align-items: center; gap: 10px; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 10px; padding: 8px 10px; font-size: 13px; cursor: pointer; }
.claro .puesto { background: #fff; }
.puesto b { display: block; font-weight: 600; }
.puesto div span { display: block; color: var(--texto-2); font-size: 11.5px; }
.puesto.elegido-p { outline: 2px solid var(--texto); outline-offset: -1px; }
.puesto.vacante { border-style: dashed; }
.puesto .persona-ini { width: 28px; height: 28px; font-size: 10.5px; }
.puesto.vacante .persona-ini { background: transparent; border: 1px dashed var(--texto-3); color: var(--texto-3); }

/* ---------- Trabajo ---------- */
.trabajo { grid-template-columns: 250px minmax(0, 1fr); }
.carpetas { border-right: 1px solid var(--linea); padding: 20px 14px; overflow: auto; display: grid; gap: 2px; align-content: start; }
.carpetas a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 9px; font-size: 13.5px; color: var(--texto-2); text-decoration: none; }
.carpetas a span { font-size: 12px; color: var(--texto-3); font-variant-numeric: tabular-nums; }
.carpetas a.activa { background: var(--suave); color: var(--texto); font-weight: 600; }
.carpetas .bloqueada { opacity: .5; }
.carpetas h3 { font-size: 12px; font-weight: 600; color: var(--texto-3); padding: 14px 12px 6px; }
.linea-tiempo { overflow: auto; padding: 22px 40px 40px; }
.linea-tiempo > div { max-width: 900px; margin: 0 auto; position: relative; padding-left: 34px; }
.linea-tiempo > div::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 0; width: 1px; background: var(--linea-2); }
.fecha-lt { position: relative; font-size: 12.5px; font-weight: 600; color: var(--texto-2); margin: 18px 0 10px; }
.fecha-lt:first-child { margin-top: 0; }
.fecha-lt::before { content: ""; position: absolute; left: -31px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--texto); }
.entrega { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 14px; padding: 14px; margin-bottom: 10px; align-items: center; cursor: pointer; }
.claro .entrega { background: #fff; }
.entrega .previa { height: 92px; border-radius: 8px; overflow: hidden; background: var(--suave); position: relative; }
.entrega .previa img { width: 100%; height: 100%; object-fit: cover; }
.entrega .previa .hoja-p { position: absolute; inset: 10px 22px 0; background: #fdfcfa; border-radius: 3px 3px 0 0; padding: 9px 8px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.entrega .previa .hoja-p i { display: block; height: 3px; background: #e4ddd2; border-radius: 2px; margin-bottom: 4px; }
.entrega .previa .hoja-p i:first-child { background: #1a1816; width: 60%; height: 4px; margin-bottom: 7px; }
.entrega .previa .tabla-p { position: absolute; inset: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; align-content: start; }
.entrega .previa .tabla-p i { height: 9px; background: var(--suave-2); border-radius: 1px; }
.entrega .previa .tabla-p i:nth-child(-n+4) { background: var(--texto-3); }
.entrega .info b { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.entrega .info .meta-e { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--texto-2); }
.entrega .info .meta-e span b { display: inline; font-size: 12.5px; font-weight: 500; color: var(--texto); margin: 0; }
.entrega .info .etiquetas-e { display: flex; gap: 6px; margin-top: 10px; }
.entrega .acciones-e { display: flex; gap: 8px; }
